From a79577a3557b1773b39dcf58b66ac44cb32829fc Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 17 May 2013 08:10:46 +0200 Subject: [PATCH] Another modification to the claim rights checking --- .../massivecraft/factions/entity/UPlayer.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/com/massivecraft/factions/entity/UPlayer.java b/src/com/massivecraft/factions/entity/UPlayer.java index e20c3504..fbcb05a0 100644 --- a/src/com/massivecraft/factions/entity/UPlayer.java +++ b/src/com/massivecraft/factions/entity/UPlayer.java @@ -663,21 +663,6 @@ public class UPlayer extends SenderEntity implements EconomyParticipato msg("You can't claim more land. You need more power."); return false; } - } - - if (oldFaction.isNormal()) - { - if (!uconf.claimingFromOthersAllowed) - { - msg("You may not claim land from others."); - return false; - } - - if (oldFaction.getRelationTo(newFaction).isAtLeast(Rel.TRUCE)) - { - msg("You can't claim this land due to your relation with the current owner."); - return false; - } if ( @@ -697,9 +682,24 @@ public class UPlayer extends SenderEntity implements EconomyParticipato } return false; } - + } + + if (oldFaction.isNormal()) + { if (!FPerm.TERRITORY.has(this, oldFaction, false)) { + if (!uconf.claimingFromOthersAllowed) + { + msg("You may not claim land from others."); + return false; + } + + if (oldFaction.getRelationTo(newFaction).isAtLeast(Rel.TRUCE)) + { + msg("You can't claim this land due to your relation with the current owner."); + return false; + } + if (!oldFaction.hasLandInflation()) { msg("%s owns this land and is strong enough to keep it.", oldFaction.getName(this));