Fixed possible NPE with Acrobatics fall checks.

This commit is contained in:
GJ 2012-06-21 21:04:19 -04:00
parent 2bef0e833f
commit fce02dc0e5

View File

@ -129,7 +129,7 @@ public class EntityListener implements Listener {
} }
if (!Misc.isInvincible(player, event)) { if (!Misc.isInvincible(player, event)) {
if (cause == DamageCause.FALL && !player.isInsideVehicle() && !player.getItemInHand().getType().equals(Material.ENDER_PEARL)) { if (cause == DamageCause.FALL && !player.isInsideVehicle() && !(player.getItemInHand().getType() == Material.ENDER_PEARL)) {
AcrobaticsManager acroManager = new AcrobaticsManager(player); AcrobaticsManager acroManager = new AcrobaticsManager(player);
acroManager.rollCheck(event); acroManager.rollCheck(event);
} }