From dde10168aeecefeea3922585de46a818d10dec0c Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 18 Jan 2012 21:10:40 -0600 Subject: [PATCH] New conf.json setting "econClaimUnconnectedFee" (default 0.0), which can be set as an additional economic cost for claiming land which is not connected to existing claims. This additional cost is only added if the faction has at least 1 existing claim somewhere in the current world, and is added to the cost after all other calculations are done. This fee is not refunded from unclaiming land or even considered in actual land values. --- src/com/massivecraft/factions/Conf.java | 1 + src/com/massivecraft/factions/FPlayer.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index 1cae33fb..0fb6b65d 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -222,6 +222,7 @@ public class Conf public static double econCostClaimFromFactionBonus = 30.0; public static double econClaimAdditionalMultiplier = 0.5; public static double econClaimRefundMultiplier = 0.7; + public static double econClaimUnconnectedFee = 0.0; public static double econCostCreate = 100.0; public static double econCostOwner = 15.0; public static double econCostSethome = 30.0; diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index a0b110c0..8405ed2b 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -779,8 +779,10 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator if (Econ.shouldBeUsed() && ! this.isAdminBypassing() && ! forFaction.isSafeZone() && ! forFaction.isWarZone()) { double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal()); - //String costString = Econ.moneyString(cost); - + + if (Conf.econClaimUnconnectedFee != 0.0 && forFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0 && !Board.isConnectedLocation(flocation, currentFaction)) + cost += Conf.econClaimUnconnectedFee; + if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction()) { Faction faction = this.getFaction();