Set shooter of Fireball or it will die instantly.

This commit is contained in:
snowleo 2011-11-21 03:50:31 +01:00
parent 90694b15cc
commit a5853baf4c

View File

@ -23,6 +23,7 @@ public class Commandfireball extends EssentialsCommand
small = true;
}
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), small ? SmallFireball.class : Fireball.class);
Fireball fireball = user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), small ? SmallFireball.class : Fireball.class);
fireball.setShooter(user.getBase());
}
}