Fixed Disband Exploit
This commit is contained in:
parent
90582c846a
commit
e14339444c
@ -30,7 +30,7 @@ public class CmdDisband extends FCommand {
|
|||||||
this.disableOnLock = true;
|
this.disableOnLock = true;
|
||||||
|
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
senderMustBePlayer = false;
|
||||||
senderMustBeMember = false;
|
senderMustBeMember = false;
|
||||||
senderMustBeModerator = false;
|
senderMustBeModerator = false;
|
||||||
senderMustBeColeader = false;
|
senderMustBeColeader = false;
|
||||||
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user