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);
|
||||
|
@ -862,10 +862,14 @@ public class FPlayer extends SenderEntity<FPlayer> implements EconomyParticipato
|
||||
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