Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
98b5b8605e
Commit
4afaec91bb
@ -25,6 +25,7 @@ import de.steamwar.bausystem.utils.FlatteningWrapper;
|
|||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ import java.util.Set;
|
|||||||
@Linked
|
@Linked
|
||||||
public class WorldEditListener implements Listener {
|
public class WorldEditListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent e) {
|
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent e) {
|
||||||
if (!isWorldEditCommand(e.getMessage().split(" ")[0])) return;
|
if (!isWorldEditCommand(e.getMessage().split(" ")[0])) return;
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ public class WorldEditListener implements Listener {
|
|||||||
if (!Permission.hasPermission(p, Permission.WORLDEDIT)) {
|
if (!Permission.hasPermission(p, Permission.WORLDEDIT)) {
|
||||||
BauSystem.MESSAGE.send("WORLD_EDIT_NO_PERMS", p);
|
BauSystem.MESSAGE.send("WORLD_EDIT_NO_PERMS", p);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
e.setMessage("/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren