From 2fae702489e49b66b4c74b0bedfe1309069f3a6e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 6 Feb 2021 15:37:12 +0100 Subject: [PATCH 1/3] Fix Signedit --- .../src/de/steamwar/bausystem/world/RegionListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java index 306a9f1..1c7df86 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java @@ -116,9 +116,9 @@ public class RegionListener implements Listener { public void editSign(PlayerInteractEvent event) { if(event.getAction() != Action.RIGHT_CLICK_BLOCK || !event.getClickedBlock().getType().name().contains("SIGN") || - !event.getPlayer().isSneaking() || - event.getItem() == null || - event.getItem().getType() != Material.AIR) + !event.getPlayer().isSneaking()) + return; + if(event.getItem() != null || event.getItem().getType() != Material.AIR) return; Player player = event.getPlayer(); -- 2.39.5 From fee6807d3b0de6f50f740cf8da74aa7fa1594757 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 6 Feb 2021 15:37:53 +0100 Subject: [PATCH 2/3] Fix Signedit --- .../src/de/steamwar/bausystem/world/RegionListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java index 1c7df86..20b4f3b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java @@ -116,9 +116,9 @@ public class RegionListener implements Listener { public void editSign(PlayerInteractEvent event) { if(event.getAction() != Action.RIGHT_CLICK_BLOCK || !event.getClickedBlock().getType().name().contains("SIGN") || - !event.getPlayer().isSneaking()) - return; - if(event.getItem() != null || event.getItem().getType() != Material.AIR) + !event.getPlayer().isSneaking() || + event.getItem() != null || + event.getItem().getType() != Material.AIR) return; Player player = event.getPlayer(); -- 2.39.5 From 76cf208379466a2787fa66b9180809a0b03d846d Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 6 Feb 2021 15:43:50 +0100 Subject: [PATCH 3/3] Fix Signedit --- .../src/de/steamwar/bausystem/world/RegionListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java index 20b4f3b..35425ad 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/RegionListener.java @@ -117,8 +117,7 @@ public class RegionListener implements Listener { if(event.getAction() != Action.RIGHT_CLICK_BLOCK || !event.getClickedBlock().getType().name().contains("SIGN") || !event.getPlayer().isSneaking() || - event.getItem() != null || - event.getItem().getType() != Material.AIR) + (event.getItem() != null && event.getItem().getType() != Material.AIR)) return; Player player = event.getPlayer(); -- 2.39.5