Fix for command payment and land claiming/unclaiming payments not checking if faction banks are actually enabled, but instead only checking the individual bank-related settings; Fix for command costs being charged incorrectly based on "land costs" setting

This commit is contained in:
Brettflan 2011-11-11 13:10:18 -06:00
parent e390c67bde
commit 95bdac3d86
4 changed files with 4 additions and 4 deletions

View File

@ -608,7 +608,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
//String costString = Econ.moneyString(cost);
if(Conf.bankFactionPaysLandCosts && this.hasFaction())
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction())
{
Faction faction = this.getFaction();
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;

View File

@ -42,7 +42,7 @@ public class CmdUnclaim extends FCommand
{
double refund = Econ.calculateClaimRefund(myFaction.getLandRounded());
if(Conf.bankFactionPaysLandCosts)
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts)
{
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim this land", "for unclaiming this land")) return;
}

View File

@ -32,7 +32,7 @@ public class CmdUnclaimall extends FCommand
if (Econ.shouldBeUsed())
{
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
if(Conf.bankFactionPaysLandCosts)
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts)
{
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
}

View File

@ -389,7 +389,7 @@ public abstract class FCommand extends MCommand<P>
{
if ( ! Econ.shouldBeUsed() || this.fme == null || cost == 0.0 || fme.hasAdminMode()) return true;
if(Conf.bankFactionPaysLandCosts && fme.hasFaction())
if(Conf.bankEnabled && Conf.bankFactionPaysCosts && fme.hasFaction())
{
if ( ! Econ.modifyMoney(myFaction, -cost, toDoThis, forDoingThis)) return false;
}