WIP: Access method for commands
This commit is contained in:
@@ -45,13 +45,6 @@ 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;
|
||||
@@ -60,6 +53,10 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user