From 46e05f99f7479420d5dfbe56d1587cba85b277b7 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 2 Dec 2016 22:41:32 -0500 Subject: [PATCH] Fixed NPE? --- .../components/magic/tricks/CannonBowListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alisolarflare/components/magic/tricks/CannonBowListener.java b/src/alisolarflare/components/magic/tricks/CannonBowListener.java index 9eb0515..e2aaa84 100644 --- a/src/alisolarflare/components/magic/tricks/CannonBowListener.java +++ b/src/alisolarflare/components/magic/tricks/CannonBowListener.java @@ -60,7 +60,7 @@ public class CannonBowListener implements Listener { @EventHandler public void onTnTExplode(EntityExplodeEvent event) { if (event.getEntityType() != EntityType.PRIMED_TNT) return; - if (!event.getEntity().getCustomName().equals(launchedTNTName)) return; + if (event.getEntity().getCustomName() != "CANNON BOW TNT:42170") return; Location loc = event.getEntity().getLocation(); event.getEntity().getWorld().createExplosion(loc.getX(), loc.getY(), loc.getZ(), 3, false, false);