From a9b1aad9569c27a4f0df36a1c5c9543834b17caa Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 23 Oct 2011 08:12:09 -0500 Subject: [PATCH] Existing safe zones and war zones are now renamed to remove the extra " " if they have it, mainly for better /f claim compatibility but also to comply with the modified default names --- src/com/massivecraft/factions/Factions.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 420b8d72..5da9ba0d 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -58,6 +58,13 @@ public class Factions extends EntityCollection faction.setTag("SafeZone"); faction.setDescription("Free from PVP and monsters"); } + else + { + // if SafeZone has old pre-1.6.0 name, rename it to remove troublesome " " + Faction faction = this.getSafeZone(); + if (faction.getTag().equals("Safe Zone")) + faction.setTag("SafeZone"); + } // Make sure the war zone faction exists if ( ! this.exists("-2")) @@ -66,6 +73,13 @@ public class Factions extends EntityCollection faction.setTag("WarZone"); faction.setDescription("Not the safest place to be"); } + else + { + // if WarZone has old pre-1.6.0 name, rename it to remove troublesome " " + Faction faction = this.getWarZone(); + if (faction.getTag().equals("War Zone")) + faction.setTag("WarZone"); + } return true; }