From 4afaec91bbcf6308aa2fe2bab689e891a577cc89 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 19 Aug 2023 23:50:03 +0200 Subject: [PATCH] Hotfix WorldEditListener Signed-off-by: yoyosource --- .../steamwar/bausystem/features/world/WorldEditListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java index ac46412f..19dc6e09 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java @@ -25,6 +25,7 @@ import de.steamwar.bausystem.utils.FlatteningWrapper; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; @@ -34,7 +35,7 @@ import java.util.Set; @Linked public class WorldEditListener implements Listener { - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent e) { if (!isWorldEditCommand(e.getMessage().split(" ")[0])) return; @@ -42,6 +43,7 @@ public class WorldEditListener implements Listener { if (!Permission.hasPermission(p, Permission.WORLDEDIT)) { BauSystem.MESSAGE.send("WORLD_EDIT_NO_PERMS", p); e.setCancelled(true); + e.setMessage("/"); } }