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:
Grafe 2013-11-13 23:20:36 +01:00
parent e1e94f5bfe
commit 780145cf78

View File

@ -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)