Fixed Disband Exploit

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

View File

@ -46,6 +46,19 @@ public class CmdDisband extends FCommand {
return; 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()) { if (!fme.isAdminBypassing()) {
Access access = faction.getAccess(fme, PermissableAction.DISBAND); Access access = faction.getAccess(fme, PermissableAction.DISBAND);
if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) { if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) {