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

This commit is contained in:
Brettflan 2011-10-23 08:12:09 -05:00
parent 4f7fd6dd96
commit a9b1aad956
1 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,13 @@ public class Factions extends EntityCollection<Faction>
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>
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;
}