DisAran
Ньюби
- Баллы
- 1
- Имя в Minecraft
- DisAran
Код:
public static Map<Integer, UUID> assoc;
Код:
public static void effect(final Location loc, final LivingEntity entityTarget) {
final BukkitRunnable runable = new BukkitRunnable(loc) {
Vector current = location.toVector();
World world = val$entityTarget.getWorld();
int timer = 100;
public void run() {
if (this.timer-- >= 0) {
final Vector targetVector = entityTarget.getLocation().toVector();
final Vector tempvector = this.current.clone();
tempvector.subtract(entityTarget.getLocation().toVector()).normalize();
final Vector diff = this.current.subtract(tempvector);
final Location loc1 = diff.toLocation(this.world);
VspyshkaSilu.CreateEffect(loc1);
if (this.current.distanceSquared(targetVector) < 4.0) {
entityTarget.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 200, 0));
entityTarget.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 200, 0));
entityTarget.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 200, 0));
this.cancel();
}
}
else {
this.cancel();
}
}
};
не пойму как фиксить