Fix for error that could occur when unclaiming land

This commit is contained in:
Brettflan 2011-08-01 17:54:05 -05:00
parent 3f6dc590d4
commit c0676c3548

View File

@ -273,6 +273,18 @@ public class Faction {
return ret; return ret;
} }
public FPlayer getFPlayerAdmin() {
if (id <= 0)
return null;
for (FPlayer fplayer : FPlayer.getAll()) {
if (fplayer.getFaction() == this && fplayer.getRole() == Role.ADMIN) {
return fplayer;
}
}
return null;
}
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) { public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
ArrayList<FPlayer> ret = new ArrayList<FPlayer>(); ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
if (id <= 0) if (id <= 0)
@ -411,10 +423,12 @@ public class Faction {
} }
public void clearAllClaimOwnership() { public void clearAllClaimOwnership() {
isClaimOwnershipEmpty();
claimOwnership.clear(); claimOwnership.clear();
} }
public void clearClaimOwnership(FLocation loc) { public void clearClaimOwnership(FLocation loc) {
isClaimOwnershipEmpty();
claimOwnership.remove(loc); claimOwnership.remove(loc);
} }