From 621ff286ab8dde5ef28b7804ebc41b7d219dbdcd Mon Sep 17 00:00:00 2001 From: TylerS1066 Date: Sat, 14 Sep 2024 14:18:51 -0500 Subject: [PATCH] Try fixing sign editing --- src/main/java/net/tylers1066/beaming/sign/CrewSign.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/tylers1066/beaming/sign/CrewSign.java b/src/main/java/net/tylers1066/beaming/sign/CrewSign.java index 409ffa3..867bb88 100644 --- a/src/main/java/net/tylers1066/beaming/sign/CrewSign.java +++ b/src/main/java/net/tylers1066/beaming/sign/CrewSign.java @@ -39,18 +39,17 @@ public final void onSignRightClick(@NotNull PlayerInteractEvent event) { if (!Config.EnableCrewSigns || !event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; - Player player = event.getPlayer(); if (!player.isSneaking()) return; - if (event.getClickedBlock() == null || !(event.getClickedBlock().getState() instanceof Sign)) + if (event.getClickedBlock() == null || !(event.getClickedBlock().getState() instanceof Sign sign)) return; - Sign sign = (Sign) event.getClickedBlock().getState(); if (!sign.getLine(0).equalsIgnoreCase("Crew:")) return; + event.setCancelled(true); if (!Tag.BEDS.getValues().contains(sign.getBlock().getRelative(0, -1, 0).getType())) { player.sendMessage(I18nSupport.getInternationalisedString("CrewSign - Need Bed Below")); return;