Replace spaces in world names for table names

This commit is contained in:
DiddiZ
2012-01-30 15:52:53 +01:00
parent 9918867b72
commit dee984a604

View File

@@ -14,7 +14,7 @@ public class WorldConfig extends LoggingEnabledMapping
public WorldConfig(File file) throws IOException {
final Map<String, Object> def = new HashMap<String, Object>();
def.put("table", "lb-" + file.getName().substring(0, file.getName().length() - 4));
def.put("table", "lb-" + file.getName().substring(0, file.getName().length() - 4).replace(' ', '_'));
for (final Logging l : Logging.values())
def.put("logging." + l.toString(), l.isDefaultEnabled());
final YamlConfiguration config = YamlConfiguration.loadConfiguration(file);