mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
Fixed a silly file creation error
This commit is contained in:
1 parent
8a4a49421f
commit
e0b8b869b4
3 files changed
+23
-25
No files matched your search
@@ -31,10 +31,6 @@
|
|||||||
# DarkPurple = &9, LightGreen = &a, LightBlue = &b
|
# DarkPurple = &9, LightGreen = &a, LightBlue = &b
|
||||||
# Rose = &c, LightPurple = &d, Yellow = &e, White = &f
|
# 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:
|
Channels:
|
||||||
general:
|
general:
|
||||||
commands: [g]
|
commands: [g]
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class Chat extends JavaPlugin {
|
|||||||
|
|
||||||
private boolean load() {
|
private boolean load() {
|
||||||
FileMgmt.checkFolders(new String[] { getRootPath(), getChannelsPath() });
|
FileMgmt.checkFolders(new String[] { getRootPath(), getChannelsPath() });
|
||||||
return configuration.loadChannels(getChannelsPath(), "/Channels.yml");
|
return configuration.loadChannels(getChannelsPath(), "Channels.yml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -197,27 +197,29 @@ public class ConfigurationHandler {
|
|||||||
|
|
||||||
if (Key.equalsIgnoreCase("worlds")) {
|
if (Key.equalsIgnoreCase("worlds")) {
|
||||||
Map<String, Object> allWorlds = (Map<String, Object>) file.get(Key);
|
Map<String, Object> allWorlds = (Map<String, Object>) file.get(Key);
|
||||||
|
|
||||||
for (String worlds : allWorlds.keySet()) {
|
if (allWorlds != null) {
|
||||||
Map<String, Object> world = (Map<String, Object>) allWorlds.get(worlds);
|
for (String worlds : allWorlds.keySet()) {
|
||||||
|
Map<String, Object> world = (Map<String, Object>) allWorlds.get(worlds);
|
||||||
channelFormats group = new channelFormats(worlds);
|
|
||||||
|
channelFormats group = new channelFormats(worlds);
|
||||||
for (String element : world.keySet()) {
|
|
||||||
if (element.equalsIgnoreCase("global"))
|
for (String element : world.keySet()) {
|
||||||
group.setGLOBAL(world.get(element).toString());
|
if (element.equalsIgnoreCase("global"))
|
||||||
|
group.setGLOBAL(world.get(element).toString());
|
||||||
if (element.equalsIgnoreCase("town"))
|
|
||||||
group.setTOWN(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("nation"))
|
||||||
|
group.setNATION(world.get(element).toString());
|
||||||
if (element.equalsIgnoreCase("default"))
|
|
||||||
group.setDEFAULT(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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user