From 18d3c4ec4ad9ca4ab6ba8ae46341c0ec2da7b0c7 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 31 Mar 2019 18:24:26 -0400 Subject: [PATCH] Fixed F Admin Bug --- .../java/com/massivecraft/factions/cmd/CmdAdmin.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java b/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java index 5c03529f..7ca6c7cb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java @@ -34,7 +34,7 @@ public class CmdAdmin extends FCommand { @Override public void perform() { FPlayer fyou = this.argAsBestFPlayerMatch(0); - if (fyou == null) { + if (fyou == null || fyou.getFaction().isWarZone() || fyou.getFaction().isWilderness() || fyou.getFaction().isSafeZone()) { return; } @@ -74,10 +74,10 @@ public class CmdAdmin extends FCommand { // if target player is currently admin, demote and replace him if (fyou == admin) { - targetFaction.promoteNewLeader(); - msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true)); - fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true)); - return; + targetFaction.promoteNewLeader(); + msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true)); + fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true)); + return; } // promote target player, and demote existing admin if one exists