public boolean configApply(CommandSender sender, AutoRefMatch match, String[] args, CommandLine options)
{
// generate a map name from the args
String mapName = StringUtils.join(args, " ");
AutoRefMap map = AutoRefMap.getMap(mapName);
World world = plugin.getSenderWorld(sender);
if (map == null)
{
sender.sendMessage(ChatColor.RED + "Unknown map: " + mapName);
return true;
}
else sender.sendMessage(ChatColor.RED + "Applying " + map.getVersionString());
Element worldConfig = null;
try { worldConfig = AutoRefMap.getConfigFileData(map.getZip()); }
catch (IOException e) { e.printStackTrace(); return true; }
catch (JDOMException e) { e.printStackTrace(); return true; }
// set a new version string if one is specified
if (options.hasOption('v'))