mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 10:45:51 +01:00
Make some notes in the source saying that we should use event based integration.
This commit is contained in:
parent
26a59fb01c
commit
5ddfb19861
@ -107,7 +107,7 @@ public class Board extends Entity<Board> 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);
|
||||
|
@ -859,13 +859,17 @@ public class FPlayer extends SenderEntity<FPlayer> 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<FPlayer> informTheseFPlayers = new HashSet<FPlayer>();
|
||||
|
Loading…
Reference in New Issue
Block a user