From 0d8526372ef19419ae8779785c6572effd5c2a31 Mon Sep 17 00:00:00 2001 From: AigleDev Date: Thu, 12 Sep 2019 21:21:23 +0200 Subject: [PATCH] change --- .../factions/listeners/FactionsPlayerListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 99fc0642..8e3a07bf 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -804,8 +804,10 @@ public class FactionsPlayerListener implements Listener { Block block = event.getClickedBlock(); Player player = event.getPlayer(); // Check if the material is bypassing protection - if (block == null || event.getItem() == null) return; // clicked in air, apparently - if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return; + if (block == null) return; // clicked in air, apparently + if(event.getItem() != null) { + if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return; + } if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) { if (!canPlayerUseBlock(player, block, false)) { event.setCancelled(true);