diff --git a/src/net/deltik/mc/signedit/listeners/CoreSignEditListener.java b/src/net/deltik/mc/signedit/listeners/CoreSignEditListener.java index 58600aa..b132c8d 100644 --- a/src/net/deltik/mc/signedit/listeners/CoreSignEditListener.java +++ b/src/net/deltik/mc/signedit/listeners/CoreSignEditListener.java @@ -43,6 +43,7 @@ import org.bukkit.event.block.SignChangeEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.ItemStack; import javax.inject.Inject; import javax.inject.Provider; @@ -128,8 +129,11 @@ private void overrideNativeBehavior(PlayerInteractEvent event, Player player, Si SignText signText = new SignText(signEditValidator); SignEditInteraction maybeSignEditInteraction = null; + ItemStack eventItem = event.getItem(); + if (player.hasPermission("signedit." + SignCommand.COMMAND_NAME + ".wax") && - event.getItem().getType().equals(Material.getMaterial("HONEYCOMB")) && + eventItem != null && + eventItem.getType().equals(Material.getMaterial("HONEYCOMB")) && !event.useItemInHand().equals(Event.Result.DENY) ) { signText.setShouldBeEditable(false);