make sure max land setting doesn't apply to factions with infinite power (such as SafeZone and WarZone)

This commit is contained in:
Brettflan 2012-02-02 13:09:43 -06:00
parent 9bc6d01a4b
commit b33b24943a

View File

@ -580,7 +580,8 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
{ {
error = P.p.txt.parse("<b>You can't claim more land! You need more power!"); error = P.p.txt.parse("<b>You can't claim more land! You need more power!");
} }
else if (ownedLand >= Conf.claimedLandsMax && Conf.claimedLandsMax != 0) { else if (Conf.claimedLandsMax != 0 && ownedLand >= Conf.claimedLandsMax && ! forFaction.getFlag(FFlag.INFPOWER))
{
error = P.p.txt.parse("<b>Limit reached. You can't claim more land!"); error = P.p.txt.parse("<b>Limit reached. You can't claim more land!");
} }
else if (currentFaction.getRelationTo(forFaction).isAtLeast(Rel.TRUCE) && ! currentFaction.isNone()) else if (currentFaction.getRelationTo(forFaction).isAtLeast(Rel.TRUCE) && ! currentFaction.isNone())