Make some notes in the source saying that we should use event based integration.
This commit is contained in:
		@@ -107,7 +107,7 @@ public class Board extends Entity<Board> implements BoardInterface
 | 
				
			|||||||
		if (territoryAccess == null || (territoryAccess.getHostFactionId().equals(Const.FACTIONID_NONE) && territoryAccess.isDefault()))
 | 
							if (territoryAccess == null || (territoryAccess.getHostFactionId().equals(Const.FACTIONID_NONE) && territoryAccess.isDefault()))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			// TODO: Listen to an event instead!
 | 
								// 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())
 | 
								if (ConfServer.onUnclaimResetLwcLocks && LWCFeatures.getEnabled())
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				LWCFeatures.clearAllChests(ps);
 | 
									LWCFeatures.clearAllChests(ps);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -862,10 +862,14 @@ public class FPlayer extends SenderEntity<FPlayer> implements EconomyParticipato
 | 
				
			|||||||
		if (claimEvent.isCancelled()) return false;
 | 
							if (claimEvent.isCancelled()) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// then make 'em pay (if applicable)
 | 
							// 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;
 | 
							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)
 | 
							if (LWCFeatures.getEnabled() && forFaction.isNormal() && ConfServer.onCaptureResetLwcLocks)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
			LWCFeatures.clearOtherChests(flocation, this.getFaction());
 | 
								LWCFeatures.clearOtherChests(flocation, this.getFaction());
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// announce success
 | 
							// announce success
 | 
				
			||||||
		Set<FPlayer> informTheseFPlayers = new HashSet<FPlayer>();
 | 
							Set<FPlayer> informTheseFPlayers = new HashSet<FPlayer>();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user