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:
parent
e390c67bde
commit
95bdac3d86
@ -608,7 +608,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
|||||||
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
||||||
//String costString = Econ.moneyString(cost);
|
//String costString = Econ.moneyString(cost);
|
||||||
|
|
||||||
if(Conf.bankFactionPaysLandCosts && this.hasFaction())
|
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction())
|
||||||
{
|
{
|
||||||
Faction faction = this.getFaction();
|
Faction faction = this.getFaction();
|
||||||
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;
|
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;
|
||||||
|
@ -42,7 +42,7 @@ public class CmdUnclaim extends FCommand
|
|||||||
{
|
{
|
||||||
double refund = Econ.calculateClaimRefund(myFaction.getLandRounded());
|
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;
|
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim this land", "for unclaiming this land")) return;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class CmdUnclaimall extends FCommand
|
|||||||
if (Econ.shouldBeUsed())
|
if (Econ.shouldBeUsed())
|
||||||
{
|
{
|
||||||
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
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;
|
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||||
}
|
}
|
||||||
|
@ -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 ( ! 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;
|
if ( ! Econ.modifyMoney(myFaction, -cost, toDoThis, forDoingThis)) return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user