Cancels default sign interaction event
All checks were successful
KnarCraft/PermissionSigns/pipeline/head This commit looks good
All checks were successful
KnarCraft/PermissionSigns/pipeline/head This commit looks good
This commit is contained in:
parent
454689b9df
commit
c288306cb3
@ -53,6 +53,8 @@ public class SignListener implements Listener {
|
|||||||
|
|
||||||
Sign sign = (Sign) block.getState();
|
Sign sign = (Sign) block.getState();
|
||||||
if (event.getHand() == EquipmentSlot.HAND) {
|
if (event.getHand() == EquipmentSlot.HAND) {
|
||||||
|
// Cancel the interaction to avoid sign editing
|
||||||
|
event.setCancelled(true);
|
||||||
handleSignClick(sign, player, event.getAction(), event);
|
handleSignClick(sign, player, event.getAction(), event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user