Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 18d3c4e

Browse files
committed
Fixed F Admin Bug
1 parent be3eaba commit 18d3c4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public CmdAdmin() {
3434
@Override
3535
public void perform() {
3636
FPlayer fyou = this.argAsBestFPlayerMatch(0);
37-
if (fyou == null) {
37+
if (fyou == null || fyou.getFaction().isWarZone() || fyou.getFaction().isWilderness() || fyou.getFaction().isSafeZone()) {
3838
return;
3939
}
4040

@@ -74,10 +74,10 @@ public void perform() {
7474

7575
// if target player is currently admin, demote and replace him
7676
if (fyou == admin) {
77-
targetFaction.promoteNewLeader();
78-
msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true));
79-
fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true));
80-
return;
77+
targetFaction.promoteNewLeader();
78+
msg(TL.COMMAND_ADMIN_DEMOTES, fyou.describeTo(fme, true));
79+
fyou.msg(TL.COMMAND_ADMIN_DEMOTED, senderIsConsole ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fyou, true));
80+
return;
8181
}
8282

8383
// promote target player, and demote existing admin if one exists

0 commit comments

Comments
 (0)