(by first4ever) Added a "claimedLandsMax" option (default 0, no limit), which prevents normal factions from being able to claim more land once they've reached this limit.

This commit is contained in:
Brettflan 2012-02-02 13:12:54 -06:00
parent 784895c779
commit a124ac6e35
2 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,7 @@ public class Conf
public static boolean claimsMustBeConnected = false; public static boolean claimsMustBeConnected = false;
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
public static int claimsRequireMinFactionMembers = 1; public static int claimsRequireMinFactionMembers = 1;
public static int claimedLandsMax = 0;
public static double considerFactionsReallyOfflineAfterXMinutes = 0.0; public static double considerFactionsReallyOfflineAfterXMinutes = 0.0;

View File

@ -723,6 +723,10 @@ 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 (Conf.claimedLandsMax != 0 && ownedLand >= Conf.claimedLandsMax && forFaction.isNormal())
{
error = P.p.txt.parse("<b>Limit reached. You can't claim more land!");
}
else if (currentFaction.getRelationTo(forFaction) == Relation.ALLY) else if (currentFaction.getRelationTo(forFaction) == Relation.ALLY)
{ {
error = P.p.txt.parse("<b>You can't claim the land of your allies."); error = P.p.txt.parse("<b>You can't claim the land of your allies.");