Changed the enum for Leader to actually be leader and not admin.

This commit is contained in:
ProSavage
2018-10-18 19:39:48 -05:00
parent 713aab8bfa
commit 80e66d7d6c
32 changed files with 181 additions and 182 deletions

View File

@@ -47,7 +47,7 @@ public class CmdKick extends FCommand {
String s = player.getName();
msg.then(s + " ").color(ChatColor.GRAY).tooltip(TL.COMMAND_KICK_CLICKTOKICK.toString() + s).command("/" + Conf.baseCommandAliases.get(0) + " kick " + s);
}
if (fme.getRole() == Role.ADMIN) {
if (fme.getRole() == Role.LEADER) {
// Only add coleader to this for the leader.
for (FPlayer player : myFaction.getFPlayersWhereRole(Role.COLEADER)) {
String s = player.getName();
@@ -80,7 +80,7 @@ public class CmdKick extends FCommand {
// - Make sure the kicked player has lower rank than the kicker.
if (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.KICK);
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
fme.msg(TL.GENERIC_NOPERMISSION, "kick");
return;
}
@@ -124,7 +124,7 @@ public class CmdKick extends FCommand {
if (Conf.logFactionKick) {
P.p.log((senderIsConsole ? "A console command" : fme.getName()) + " kicked " + toKick.getName() + " from the faction: " + toKickFaction.getTag());
}
if (toKick.getRole() == Role.ADMIN) {
if (toKick.getRole() == Role.LEADER) {
toKickFaction.promoteNewLeader();
}
toKickFaction.deinvite(toKick);