From 66991fba02b02dd3e5044a0f87ad355b1e231264 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 29 May 2013 14:31:09 +0200 Subject: [PATCH] Fix a bug where you could not claim a startingpoint for your base in another world --- src/com/massivecraft/factions/entity/Faction.java | 2 +- src/com/massivecraft/factions/entity/UConf.java | 2 +- src/com/massivecraft/factions/entity/UPlayer.java | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/com/massivecraft/factions/entity/Faction.java b/src/com/massivecraft/factions/entity/Faction.java index a40218a0..f8231081 100644 --- a/src/com/massivecraft/factions/entity/Faction.java +++ b/src/com/massivecraft/factions/entity/Faction.java @@ -817,7 +817,7 @@ public class Faction extends Entity implements EconomyParticipator } public int getLandCountInWorld(String worldName) { - return BoardColls.get().get(worldName).getCount(this); + return Board.get(worldName).getCount(this); } public boolean hasLandInflation() diff --git a/src/com/massivecraft/factions/entity/UConf.java b/src/com/massivecraft/factions/entity/UConf.java index a0c5dbca..8a347d2a 100644 --- a/src/com/massivecraft/factions/entity/UConf.java +++ b/src/com/massivecraft/factions/entity/UConf.java @@ -110,7 +110,7 @@ public class UConf extends Entity public boolean claimsMustBeConnected = true; public boolean claimingFromOthersAllowed = true; - public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; + public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = false; public int claimsRequireMinFactionMembers = 1; public int claimedLandsMax = 0; diff --git a/src/com/massivecraft/factions/entity/UPlayer.java b/src/com/massivecraft/factions/entity/UPlayer.java index 7ac2b092..bf3c1ec1 100644 --- a/src/com/massivecraft/factions/entity/UPlayer.java +++ b/src/com/massivecraft/factions/entity/UPlayer.java @@ -667,9 +667,12 @@ public class UPlayer extends SenderEntity implements EconomyParticipato if ( uconf.claimsMustBeConnected - && newFaction.getLandCountInWorld(ps.getWorld()) > 0 - && !BoardColls.get().isConnectedPs(chunk, newFaction) - && (!uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction || !oldFaction.isNormal()) + && + newFaction.getLandCountInWorld(ps.getWorld()) > 0 + && + !BoardColls.get().isConnectedPs(chunk, newFaction) + && + (!uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction || oldFaction.isNone()) ) { if (uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction)