mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-19 16:55:21 +01:00
(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:
parent
784895c779
commit
a124ac6e35
@ -113,6 +113,7 @@ public class Conf
|
||||
public static boolean claimsMustBeConnected = false;
|
||||
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
|
||||
public static int claimsRequireMinFactionMembers = 1;
|
||||
public static int claimedLandsMax = 0;
|
||||
|
||||
public static double considerFactionsReallyOfflineAfterXMinutes = 0.0;
|
||||
|
||||
|
@ -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!");
|
||||
}
|
||||
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)
|
||||
{
|
||||
error = P.p.txt.parse("<b>You can't claim the land of your allies.");
|
||||
|
Loading…
Reference in New Issue
Block a user