From 83f690c9c51e71a04ccc217c6c0c08c3c19de903 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 23 Oct 2011 10:04:36 -0500 Subject: [PATCH] Fix for unclaimall command not working if Economy was disabled --- .../factions/cmd/CmdUnclaimall.java | 17 ++++++++++------- .../factions/integration/SpoutFeatures.java | 15 --------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java index de711578..0a6a73af 100644 --- a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java +++ b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java @@ -28,14 +28,17 @@ public class CmdUnclaimall extends FCommand @Override public void perform() { - double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded()); - if(Conf.bankFactionPaysLandCosts) + if (Econ.shouldBeUsed()) { - if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return; - } - else - { - if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return; + double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded()); + if(Conf.bankFactionPaysLandCosts) + { + if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return; + } + else + { + if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return; + } } Board.unclaimAll(myFaction.getId()); diff --git a/src/com/massivecraft/factions/integration/SpoutFeatures.java b/src/com/massivecraft/factions/integration/SpoutFeatures.java index 448e2b39..1eda111f 100644 --- a/src/com/massivecraft/factions/integration/SpoutFeatures.java +++ b/src/com/massivecraft/factions/integration/SpoutFeatures.java @@ -103,21 +103,6 @@ public class SpoutFeatures if (fLoc == null || player.getLastStoodAt().equals(fLoc)) 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 players = FPlayers.i.getOnline(); - - for (FPlayer player : players) - { - if (fLoc == null || player.getLastStoodAt() == fLoc) - mainListener.updateOwnerList(player); - } - } - }, 5);*/ } // update owner list for specified player