public EZZoneCreate(String[] data, CommandSender sender)
{
if (sender instanceof Player)
{
Player player = (Player) sender;
EpicZonePlayer ezp = General.getPlayer(player.getName());
if (ezp.getAdmin()) // Only admins can create zones
{
if (ezp.getMode() == EpicZoneMode.None)
{
if (data.length > 1 && data[1].length() > 0)
{
String tag = data[1].replaceAll("[^a-zA-Z0-9_]", "");
if (General.myZones.get(tag) == null)
{
EpicZone zone = new EpicZone();
zone.setTag(tag);
zone.setName(tag);
zone.setWorld(player.getWorld().getName());
Log.Write(player.getWorld().getName());
Log.Write(General.myGlobalZones.get(player.getWorld().getName().toLowerCase()).getName());
zone.setDefaults(General.myGlobalZones.get(player.getWorld().getName().toLowerCase()));
ezp.setEditZone(zone);
ezp.setMode(EpicZoneMode.ZoneDraw);
Message.Send(sender, Message_ID.Mode_00020_Draw_StartAfterNew);
}
else
{
Message.Send(sender, Message_ID.Warning_00103_Zone_X_Exists, new String[]{tag});