Fixed disband exploit

This commit is contained in:
ProSavage 2018-12-23 18:20:54 -06:00
parent 266c598b76
commit 7be48b5942
7 changed files with 15 additions and 7 deletions

View File

@ -3,11 +3,12 @@
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<versioning>
<release>1.6.9.5-U0.2.1-RC-1.5-BETA-2</release>
<release>1.6.9.5-U0.2.1-RC-1.5-STABLE</release>
<versions>
<version>1.6.9.5-U0.2.1-RC-1.5-BETA</version>
<version>1.6.9.5-U0.2.1-RC-1.5-BETA-2</version>
<version>1.6.9.5-U0.2.1-RC-1.5-STABLE</version>
</versions>
<lastUpdated>20181221214408</lastUpdated>
<lastUpdated>20181222234636</lastUpdated>
</versioning>
</metadata>

View File

@ -1 +1 @@
e9ce0bdae55853de86510ddacb671877
53a6a6cb7d4b4409eeaa35c1fababa7c

View File

@ -1 +1 @@
694467945b9eeace46a9acb0cfd0fddc9c87fad8
6322473e3dc1d937e8d27f82b10f12ac42f8fbb4

View File

@ -4,7 +4,7 @@
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>1.6.9.5-U0.2.1-RC-1.5-BETA-2</version>
<version>1.6.9.5-U0.2.1-RC-1.5-STABLE</version>
<packaging>jar</packaging>
<name>SavageFactions</name>

View File

@ -273,6 +273,8 @@ public interface Faction extends EconomyParticipator {
FPlayer getFPlayerAdmin();
FPlayer getFPlayerLeader();
ArrayList<FPlayer> getFPlayersWhereRole(Role role);
ArrayList<Player> getOnlinePlayers();

View File

@ -47,7 +47,7 @@ public class CmdDisband extends FCommand {
if (!fme.isAdminBypassing()) {
Access access = faction.getAccess(fme, PermissableAction.DISBAND);
if (fme.getRole() != Role.LEADER && access != Access.ALLOW) {
if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "disband " + faction.getTag());
return;
}

View File

@ -917,6 +917,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
return ret;
}
public FPlayer getFPlayerAdmin() {
if (!this.isNormal()) {
return null;
@ -930,6 +931,10 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
return null;
}
public FPlayer getFPlayerLeader() {
return getFPlayerAdmin();
}
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
ArrayList<FPlayer> ret = new ArrayList<>();
if (!this.isNormal()) {