SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix WorldEditListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-08-19 23:50:03 +02:00
Ursprung 98b5b8605e
Commit 4afaec91bb

Datei anzeigen

@ -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("/");
}
}