Fixed a silly file creation error

This commit is contained in:
ElgarL committed 2012-01-15 22:41:25 +00:00
1 parent 8a4a49421f
commit e0b8b869b4
3 files changed
+23 -25

No files matched your search

-4
View File
@@ -31,10 +31,6 @@
# DarkPurple = &9, LightGreen = &a, LightBlue = &b
# Rose = &c, LightPurple = &d, Yellow = &e, White = &f
# Spam_time set the minimum time between messages to be flagged as spam
spam_time: 2
Channels:
general:
commands: [g]
@@ -67,7 +67,7 @@ public class Chat extends JavaPlugin {
private boolean load() {
FileMgmt.checkFolders(new String[] { getRootPath(), getChannelsPath() });
return configuration.loadChannels(getChannelsPath(), "/Channels.yml");
return configuration.loadChannels(getChannelsPath(), "Channels.yml");
}
@Override
@@ -197,27 +197,29 @@ public class ConfigurationHandler {
if (Key.equalsIgnoreCase("worlds")) {
Map<String, Object> allWorlds = (Map<String, Object>) file.get(Key);
for (String worlds : allWorlds.keySet()) {
Map<String, Object> world = (Map<String, Object>) allWorlds.get(worlds);
channelFormats group = new channelFormats(worlds);
for (String element : world.keySet()) {
if (element.equalsIgnoreCase("global"))
group.setGLOBAL(world.get(element).toString());
if (element.equalsIgnoreCase("town"))
group.setTOWN(world.get(element).toString());
if (element.equalsIgnoreCase("nation"))
group.setNATION(world.get(element).toString());
if (element.equalsIgnoreCase("default"))
group.setDEFAULT(world.get(element).toString());
if (allWorlds != null) {
for (String worlds : allWorlds.keySet()) {
Map<String, Object> world = (Map<String, Object>) allWorlds.get(worlds);
channelFormats group = new channelFormats(worlds);
for (String element : world.keySet()) {
if (element.equalsIgnoreCase("global"))
group.setGLOBAL(world.get(element).toString());
if (element.equalsIgnoreCase("town"))
group.setTOWN(world.get(element).toString());
if (element.equalsIgnoreCase("nation"))
group.setNATION(world.get(element).toString());
if (element.equalsIgnoreCase("default"))
group.setDEFAULT(world.get(element).toString());
}
System.out.print("Adding: " + group.getName());
ChatSettings.addFormatGroup(group);
}
System.out.print("Adding: " + group.getName());
ChatSettings.addFormatGroup(group);
}
}