diff --git a/src/com/massivecraft/factions/Board.java b/src/com/massivecraft/factions/Board.java index 25473cb9..6684989f 100644 --- a/src/com/massivecraft/factions/Board.java +++ b/src/com/massivecraft/factions/Board.java @@ -107,7 +107,7 @@ public class Board extends Entity implements BoardInterface if (territoryAccess == null || (territoryAccess.getHostFactionId().equals(Const.FACTIONID_NONE) && territoryAccess.isDefault())) { // TODO: Listen to an event instead! - // And this is probably the place where the event should be triggered! + // NOTE: And this is probably the place where the event should be triggered! if (ConfServer.onUnclaimResetLwcLocks && LWCFeatures.getEnabled()) { LWCFeatures.clearAllChests(ps); diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index 04387c54..57e2edde 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -859,13 +859,17 @@ public class FPlayer extends SenderEntity implements EconomyParticipato LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction, this); Bukkit.getServer().getPluginManager().callEvent(claimEvent); - if(claimEvent.isCancelled()) return false; + if (claimEvent.isCancelled()) return false; // then make 'em pay (if applicable) + // TODO: The economy integration should cancel the event above! if (mustPay && ! Econ.modifyMoney(payee, -cost, "to claim this land", "for claiming this land")) return false; + // TODO: The LWC integration should listen to Monitor for the claim event. if (LWCFeatures.getEnabled() && forFaction.isNormal() && ConfServer.onCaptureResetLwcLocks) + { LWCFeatures.clearOtherChests(flocation, this.getFaction()); + } // announce success Set informTheseFPlayers = new HashSet();