diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index c0e2f0a4..261d2a3d 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -129,6 +129,7 @@ public class Conf public static boolean permanentFactionsDisableLeaderPromotion = false; public static boolean claimsMustBeConnected = false; + public static boolean claimingFromOthersAllowed = true; public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public static int claimsRequireMinFactionMembers = 1; public static int claimedLandsMax = 0; diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index c4ffcedc..4823432c 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -575,6 +575,10 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator { error = P.p.txt.parse("Limit reached. You can't claim more land!"); } + else if ( ! Conf.claimingFromOthersAllowed && currentFaction.isNormal()) + { + error = P.p.txt.parse("You may not claim land from others."); + } else if (currentFaction.getRelationTo(forFaction).isAtLeast(Rel.TRUCE) && ! currentFaction.isNone()) { error = P.p.txt.parse("You can't claim this land due to your relation with the current owner.");