- Fixed stuff

This commit is contained in:
AlexTheCoder 2016-04-16 20:36:19 -04:00
parent b0d30a4ff4
commit 35d7dd8b44

View File

@ -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);
}
}