Fixed Disband Exploit

This commit is contained in:
Driftay 2018-12-29 02:50:44 -05:00
parent 90582c846a
commit e14339444c

View File

@ -30,7 +30,7 @@ public class CmdDisband extends FCommand {
this.disableOnLock = true;
senderMustBePlayer = false;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
@ -46,6 +46,19 @@ public class CmdDisband extends FCommand {
return;
}
boolean isMyFaction = fme != null && faction == myFaction;
if (isMyFaction) {
if (!assertMinRole(Role.LEADER)) {
return;
}
} else {
if (!Permission.DISBAND_ANY.has(sender, true)) {
return;
}
}
if (!fme.isAdminBypassing()) {
Access access = faction.getAccess(fme, PermissableAction.DISBAND);
if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) {