- Fixed stuff
This commit is contained in:
parent
b0d30a4ff4
commit
35d7dd8b44
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.minecraftleague.variation.wither.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@ -479,6 +480,9 @@ public class WitherMinionManager implements Listener
|
||||
LivingEntity e = (LivingEntity)event.getEntity();
|
||||
double newHealth = Math.max(0, e.getHealth() - event.getDamage());
|
||||
newHealth = Math.min(e.getMaxHealth(), newHealth);
|
||||
|
||||
if (newHealth == 0)
|
||||
Bukkit.getPluginManager().callEvent(new EntityDeathEvent(e, new ArrayList<ItemStack>(), 0));
|
||||
e.setHealth(newHealth);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user