Fixed F Admin Bug

This commit is contained in:
Driftay 2019-03-31 18:24:26 -04:00
parent be3eaba002
commit 18d3c4ec4a
1 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ public class CmdAdmin extends FCommand {
@Override @Override
public void perform() { public void perform() {
FPlayer fyou = this.argAsBestFPlayerMatch(0); FPlayer fyou = this.argAsBestFPlayerMatch(0);
if (fyou == null) { if (fyou == null || fyou.getFaction().isWarZone() || fyou.getFaction().isWilderness() || fyou.getFaction().isSafeZone()) {
return; return;
} }
@ -74,10 +74,10 @@ public class CmdAdmin extends FCommand {
// if target player is currently admin, demote and replace him // if target player is currently admin, demote and replace him
if (fyou == admin) { if (fyou == admin) {
targetFaction.promoteNewLeader(); targetFaction.promoteNewLeader();
msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true)); msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true));
fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true)); fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true));
return; return;
} }
// promote target player, and demote existing admin if one exists // promote target player, and demote existing admin if one exists