@EventHandler
public static void fireEffect(PlayerMoveEvent e) {
Player p = e.getPlayer();
BukkitRunnable run = new BukkitRunnable() {
@Override
public void run() {
double x1 = p.getLocation().getX();
double x2 = p.getLocation().getX();
double y1 = p.getLocation().getY();
double y2 = p.getLocation().getY();
double z1 = p.getLocation().getZ();
double z2 = p.getLocation().getZ();
if(x1 != x2 || y1 != y2 || z1 != z2) {
if (l.fireEffect.contains(p)) {
BukkitRunnable startEffect = new BukkitRunnable() {
@Override
public void run() {
ParticleEffect.LAVA.display(0, 0, 0, 5, 5, p.getLocation(), 10);
}
};
startEffect.runTaskTimer(plugin, 1, 500);
}
}
}
};
run.runTaskTimer(plugin, 2, 2);
}