mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-12-01 06:53:26 +01:00
Players without the "dxl.cmdedit" permissions canit use any commands while in edit modus. We need a better solution though (cmd blacklist/whitelist for edit and game)
This commit is contained in:
parent
e1e94f5bfe
commit
780145cf78
@ -400,7 +400,10 @@ public class PlayerListener implements Listener {
|
||||
|
||||
DPlayer dplayer = DPlayer.get(event.getPlayer());
|
||||
if (dplayer != null) {
|
||||
if (!dplayer.isEditing) {
|
||||
if (dplayer.isEditing && p.permission.has(event.getPlayer(), "dungeonsxl.cmdedit") || event.getPlayer().isOp()){
|
||||
return;
|
||||
}
|
||||
|
||||
String[] splittedCmd = event.getMessage().split(" ");
|
||||
if (!splittedCmd[0].equalsIgnoreCase("/dungeon") && !splittedCmd[0].equalsIgnoreCase("/dungeonsxl") && !splittedCmd[0].equalsIgnoreCase("/dxl")) {
|
||||
p.msg(event.getPlayer(), p.language.get("Error_Cmd"));
|
||||
@ -408,7 +411,6 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Inventory Events
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
Loading…
Reference in New Issue
Block a user