Fix for disabled "bankEnabled" setting being ignored in some cases
Data is no longer stored for players with full power but not in a faction
This commit is contained in:
parent
a9146ac27f
commit
54ba4473a2
@ -771,7 +771,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;
|
||||
@ -809,6 +809,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
@Override
|
||||
public boolean shouldBeSaved()
|
||||
{
|
||||
if (this.getPowerRounded() == this.getPowerMaxRounded() && !this.hasFaction()) return false;
|
||||
return ! this.deleteMe;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user