Fixed "No worlds configured"

This commit is contained in:
Admin
2011-12-09 13:35:35 +01:00
parent 07c3c1f2c1
commit f11c405713

View File

@@ -183,7 +183,7 @@ public class Config extends LoggingEnabledMapping
} }
final List<String> loggedWorlds = toStringList(config.getList("loggedWorlds")); final List<String> loggedWorlds = toStringList(config.getList("loggedWorlds"));
worlds = new HashMap<Integer, WorldConfig>(); worlds = new HashMap<Integer, WorldConfig>();
if (worldNames.size() == 0) if (loggedWorlds.size() == 0)
throw new DataFormatException("No worlds configured"); throw new DataFormatException("No worlds configured");
for (final String world : loggedWorlds) for (final String world : loggedWorlds)
worlds.put(world.hashCode(), new WorldConfig(new File(logblock.getDataFolder(), friendlyWorldname(world) + ".yml"))); worlds.put(world.hashCode(), new WorldConfig(new File(logblock.getDataFolder(), friendlyWorldname(world) + ".yml")));