From c288306cb3b03850b87c1aa4c48368f67e7a2528 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Wed, 3 Jan 2024 18:42:09 +0100 Subject: [PATCH] Cancels default sign interaction event --- .../net/knarcraft/permissionsigns/listener/SignListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/knarcraft/permissionsigns/listener/SignListener.java b/src/main/java/net/knarcraft/permissionsigns/listener/SignListener.java index 2af48b7..92c500d 100644 --- a/src/main/java/net/knarcraft/permissionsigns/listener/SignListener.java +++ b/src/main/java/net/knarcraft/permissionsigns/listener/SignListener.java @@ -53,6 +53,8 @@ public class SignListener implements Listener { Sign sign = (Sign) block.getState(); if (event.getHand() == EquipmentSlot.HAND) { + // Cancel the interaction to avoid sign editing + event.setCancelled(true); handleSignClick(sign, player, event.getAction(), event); } }