Fix for unclaimall command not working if Economy was disabled
This commit is contained in:
parent
9710ec911e
commit
83f690c9c5
@ -27,6 +27,8 @@ public class CmdUnclaimall extends FCommand
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
|
{
|
||||||
|
if (Econ.shouldBeUsed())
|
||||||
{
|
{
|
||||||
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
||||||
if(Conf.bankFactionPaysLandCosts)
|
if(Conf.bankFactionPaysLandCosts)
|
||||||
@ -37,6 +39,7 @@ public class CmdUnclaimall extends FCommand
|
|||||||
{
|
{
|
||||||
if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Board.unclaimAll(myFaction.getId());
|
Board.unclaimAll(myFaction.getId());
|
||||||
myFaction.msg("%s<i> unclaimed ALL of your faction's land.", fme.describeTo(myFaction, true));
|
myFaction.msg("%s<i> unclaimed ALL of your faction's land.", fme.describeTo(myFaction, true));
|
||||||
|
@ -103,21 +103,6 @@ public class SpoutFeatures
|
|||||||
if (fLoc == null || player.getLastStoodAt().equals(fLoc))
|
if (fLoc == null || player.getLastStoodAt().equals(fLoc))
|
||||||
mainListener.updateOwnerList(player);
|
mainListener.updateOwnerList(player);
|
||||||
}
|
}
|
||||||
/* // immediate update after a change doesn't seem to work; oh well, delay it slightly
|
|
||||||
P.p.getServer().getScheduler().scheduleSyncDelayedTask(P.p, new Runnable()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
Set<FPlayer> players = FPlayers.i.getOnline();
|
|
||||||
|
|
||||||
for (FPlayer player : players)
|
|
||||||
{
|
|
||||||
if (fLoc == null || player.getLastStoodAt() == fLoc)
|
|
||||||
mainListener.updateOwnerList(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 5);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update owner list for specified player
|
// update owner list for specified player
|
||||||
|
Loading…
Reference in New Issue
Block a user