Code:java package me.Tyep; import org.bukkit.Effect;import org.bukkit.Location;import org.bukkit.event.Listener;import org.bukkit.plugin.java.JavaPlugin; public class Game extends JavaPlugin implements Listener { public void playCircularEffect(Location loction, Effect effect, boolean v) { for(int i = 0; i <=8;i+= ((!v && (i ==3)) ? 2 : 1)) location.getWorld().playEffect(location, effect, i); } } Plz Help thx! btw i am newb :3
English only please Anyway I don't think you actually explained what's wrong with it, or showed us the error. Can you please provide more information please so I can help yah out Thanks
you have to create the variable "location" and also you have to add onDisable and onEnable. for example put this before "public void PlayCircularEffect" Code:java public void onDisable() {log("Plugin has been disabled.");} public void onEnable() {PluginManager pm = getServer().getPluginManager(); pm.registerEvents(this, this); log("Plugin has successfully enabled.");} Location location = new Location(player.getLocation()); so it would look like this: Code:java package me.Tyep; import org.bukkit.Effect;import org.bukkit.Location;import org.bukkit.event.Listener;import org.bukkit.plugin.java.JavaPlugin; public class Game extends JavaPlugin implements Listener { public void onDisable() { log("Plugin has been disabled."); } public void onEnable() { PluginManager pm = getServer().getPluginManager(); pm.registerEvents(this, this); log("Plugin has successfully enabled."); } Location location = new Location(player.getLocation()); public void playCircularEffect(Location loction, Effect effect, boolean v) { for(int i = 0; i <=8;i+= ((!v && (i ==3)) ? 2 : 1)) location.getWorld().playEffect(location, effect, i); } }
ok location.getWorld().playEffect(location, effect, i); the location parts of that is giving me a error
jthort whoops, I copied and pasted this from one of my plugins to save time and forgot to take that out