From b58eef400d6aa987f999bd0545b8f08c90db43b7 Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Thu, 18 Jun 2020 04:36:25 +0200 Subject: [PATCH] Fixed NullPointer in Explosion permission --- .../permission/permissions/listening/ExplosionsPermission.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/skyblock/permission/permissions/listening/ExplosionsPermission.java b/src/main/java/com/songoda/skyblock/permission/permissions/listening/ExplosionsPermission.java index 210c91f2..80e8e1b8 100644 --- a/src/main/java/com/songoda/skyblock/permission/permissions/listening/ExplosionsPermission.java +++ b/src/main/java/com/songoda/skyblock/permission/permissions/listening/ExplosionsPermission.java @@ -81,7 +81,7 @@ public class ExplosionsPermission extends ListeningPermission { @PermissionHandler public void onTNTInteract(PlayerInteractEvent event) { - if(event.getItem().getType().equals(CompatibleMaterial.FLINT_AND_STEEL.getMaterial()) + if(event.getItem() != null && event.getItem().getType().equals(CompatibleMaterial.FLINT_AND_STEEL.getMaterial()) && event.getClickedBlock().getType().equals(CompatibleMaterial.TNT.getBlockMaterial())){ cancelAndMessage(event, event.getPlayer(), plugin, plugin.getMessageManager()); }