New conf.json option "warZoneFriendlyFire", defaults to disabled; if enabled, allies and fellow faction members can hurt each other in war zones
This commit is contained in:
		@@ -80,6 +80,7 @@ public class Conf {
 | 
			
		||||
	public static boolean warZoneBlockFireballs = false;
 | 
			
		||||
	public static boolean warZoneBlockTNT = true;
 | 
			
		||||
	public static boolean warZonePowerLoss = true;
 | 
			
		||||
	public static boolean warZoneFriendlyFire = false;
 | 
			
		||||
	
 | 
			
		||||
	public static boolean wildernessDenyBuild = false;
 | 
			
		||||
	public static boolean wildernessDenyUseage = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -156,11 +156,16 @@ public class FactionsEntityListener extends EntityListener {
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		Faction locFaction = Board.getFactionAt(new FLocation(attacker));
 | 
			
		||||
		
 | 
			
		||||
		// so we know from above that the defender isn't in a safezone... what about the attacker, sneaky dog that he might be?
 | 
			
		||||
		if (Board.getFactionAt(new FLocation(attacker)).isSafeZone()) {
 | 
			
		||||
		if (locFaction.isSafeZone()) {
 | 
			
		||||
			attacker.sendMessage("You can't hurt other players while you are in a SafeZone.");
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
		else if (locFaction.isWarZone() && Conf.warZoneFriendlyFire) {
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		Relation relation = defender.getRelation(attacker);
 | 
			
		||||
		
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user