WIP: Access method for commands
This commit is contained in:
@@ -40,12 +40,9 @@ public class CmdSethome extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fme.isAdminBypassing()) {
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.SETHOME);
|
||||
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN && !Permission.SETHOME_ANY.has(sender, true)) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "set home");
|
||||
return;
|
||||
}
|
||||
if (!this.hasAccess(PermissableAction.SETHOME) && !Permission.SETHOME_ANY.has(sender, true)) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "set home");
|
||||
return;
|
||||
}
|
||||
|
||||
// Can the player set the faction home HERE?
|
||||
|
||||
Reference in New Issue
Block a user