Revert "WIP: Access method for commands"

This reverts commit 9c6cc187f2.
This commit is contained in:
ProSavage
2018-09-08 17:28:09 -05:00
parent 9a773702eb
commit 90ae1822bc
21 changed files with 66 additions and 111 deletions

View File

@@ -45,6 +45,13 @@ public class CmdDisband extends FCommand {
boolean isMyFaction = fme != null && faction == myFaction;
if (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.DISBAND);
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "disband faction");
return;
}
}
if (!faction.isNormal()) {
msg(TL.COMMAND_DISBAND_IMMUTABLE.toString());
return;
@@ -53,10 +60,6 @@ public class CmdDisband extends FCommand {
msg(TL.COMMAND_DISBAND_MARKEDPERMANENT.toString());
return;
}
if (!this.hasAccess(PermissableAction.DISBAND)) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "disband faction");
return;
}
// check for tnt before disbanding.