clean up permission checking

This commit is contained in:
Aikar
2017-06-07 23:46:33 -04:00
parent c7dfe4eeb3
commit 64c04e5944
4 changed files with 14 additions and 23 deletions
@@ -101,16 +101,10 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
String checkSub = ApacheCommonsLangUtil.join(args, " ", 0, i).toLowerCase();
BaseCommand subHandler = this.subCommands.get(checkSub);
if (subHandler != null) {
if (!subHandler.testPermission(sender)) {
return true;
}
subHandler.execute(sender, commandLabel, args);
return false;
}
}
if (!this.defCommand.testPermission(sender)) {
return true;
}
this.defCommand.execute(sender, commandLabel, args);
return false;