Forgot offline block protection. Added now.
Change-Id: Ib4e8866e5da655e01bdbb64f61d2130c664bc241
This commit is contained in:
		@@ -258,14 +258,21 @@ public class FactionsPlayerListener extends PlayerListener{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		Material material = block.getType();
 | 
							Material material = block.getType();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							Faction otherFaction = Board.getFactionAt(new FLocation(block));
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		// We only care about some material types.
 | 
							// We only care about some material types.
 | 
				
			||||||
 | 
							if (otherFaction.getOnlinePlayers()!=null){
 | 
				
			||||||
			if ( ! Conf.territoryProtectedMaterials.contains(material)) {
 | 
								if ( ! Conf.territoryProtectedMaterials.contains(material)) {
 | 
				
			||||||
				return true;
 | 
									return true;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}else{
 | 
				
			||||||
 | 
								if ( ! Conf.territoryProtectedMaterialsWhenOffline.contains(material)) {
 | 
				
			||||||
 | 
									return true;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		FPlayer me = FPlayer.get(player);
 | 
							FPlayer me = FPlayer.get(player);
 | 
				
			||||||
		Faction myFaction = me.getFaction();
 | 
							Faction myFaction = me.getFaction();
 | 
				
			||||||
		Faction otherFaction = Board.getFactionAt(new FLocation(block));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// In safe zones you may use any block...
 | 
							// In safe zones you may use any block...
 | 
				
			||||||
		if (otherFaction.isNormal() && myFaction != otherFaction) {
 | 
							if (otherFaction.isNormal() && myFaction != otherFaction) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user