Add Admin and Permission check to /f perm (#1062)
* Remove perms Action * Add Permission check to /f perm * Refactor flight perm * Add fly perm to GUI * Remove useless perm check
This commit is contained in:
@@ -34,7 +34,7 @@ public class CmdPerm extends FCommand {
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = true;
|
||||
senderMustBeModerator = false;
|
||||
senderMustBeAdmin = false;
|
||||
senderMustBeAdmin = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CmdSethome extends FCommand {
|
||||
// Can the player set the home for this faction?
|
||||
// Check for ALLOW access as well before we check for role.
|
||||
if (faction == myFaction && access != Access.ALLOW) {
|
||||
if (!Permission.SETHOME_ANY.has(sender) || !assertMinRole(Role.MODERATOR)) {
|
||||
if (!Permission.SETHOME_ANY.has(sender, true) || !assertMinRole(Role.MODERATOR)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -32,10 +32,9 @@ public enum PermissableAction {
|
||||
ACCESS("access"),
|
||||
DISBAND("disband"),
|
||||
PROMOTE("promote"),
|
||||
PERMS("perms"),
|
||||
SETWARP("setwarp"),
|
||||
WARP("warp"),
|
||||
FLIGHT("fly"),;
|
||||
FLY("fly"),;
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -938,7 +938,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
return true;
|
||||
}
|
||||
|
||||
Access access = faction.getAccess(this, PermissableAction.FLIGHT);
|
||||
Access access = faction.getAccess(this, PermissableAction.FLY);
|
||||
return access != null && access == Access.ALLOW;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user