Added offline protection using the new configs
Change-Id: I93c5122bce09a3bd760fcd18d4dd0801a3548af9
This commit is contained in:
		@@ -202,12 +202,18 @@ public class FactionsPlayerListener extends PlayerListener{
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( ! Conf.territoryDenyUseageMaterials.contains(material)) {
 | 
			
		||||
			return true; // Item isn't one we're preventing.
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Faction otherFaction = Board.getFactionAt(new FLocation(block));
 | 
			
		||||
 | 
			
		||||
		if (otherFaction.getOnlinePlayers()!=null){
 | 
			
		||||
			if ( ! Conf.territoryDenyUseageMaterials.contains(material)) {
 | 
			
		||||
				return true; // Item isn't one we're preventing for online factions.
 | 
			
		||||
			}
 | 
			
		||||
		}else{
 | 
			
		||||
			if ( ! Conf.territoryDenyUseageMaterialsWhenOffline.contains(material)) {
 | 
			
		||||
				return true; // Item isn't one we're preventing for offline factions.
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		FPlayer me = FPlayer.get(player);
 | 
			
		||||
 | 
			
		||||
		if (otherFaction.isNone()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user