From fce02dc0e5ef706a4f91f3d79eb950dd40c8bb93 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 21 Jun 2012 21:04:19 -0400 Subject: [PATCH] Fixed possible NPE with Acrobatics fall checks. --- src/main/java/com/gmail/nossr50/listeners/EntityListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 800f0b3d8..0d6d7e03b 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -129,7 +129,7 @@ public class EntityListener implements Listener { } 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); acroManager.rollCheck(event); }