Fixed NPE?
This commit is contained in:
parent
3d88f355fb
commit
46e05f99f7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue