* Fixed players able to die in lava, etc. Fixes #29.

This commit is contained in:
Steffion 2013-10-08 17:24:39 +02:00
parent 905486bf40
commit 403b4a2f0c

View File

@ -21,8 +21,7 @@ public class OnEntityDamageEvent implements Listener {
Player player = (Player) event.getEntity();
for (Arena arena : W.arenaList) {
if (arena.playersInArena.contains(player)) {
if (event.getCause().equals(DamageCause.FALL)
|| event.getCause().equals(DamageCause.DROWNING)) {
if (!event.getCause().equals(DamageCause.ENTITY_ATTACK)) {
event.setCancelled(true);
}
}