diff --git a/api/src/main/java/com/alttd/chat/config/Config.java b/api/src/main/java/com/alttd/chat/config/Config.java index 2f7bfc0..84ca66d 100755 --- a/api/src/main/java/com/alttd/chat/config/Config.java +++ b/api/src/main/java/com/alttd/chat/config/Config.java @@ -38,9 +38,9 @@ public final class Config { CONFIGPATH = new File(File.separator + "mnt" + File.separator + "configs" + File.separator + "ChatPlugin"); CONFIG_FILE = new File(CONFIGPATH, "config.yml"); configLoader = YamlConfigurationLoader.builder() - .file(CONFIG_FILE) - .nodeStyle(NodeStyle.BLOCK) - .build(); + .file(CONFIG_FILE) + .nodeStyle(NodeStyle.BLOCK) + .build(); if (!CONFIG_FILE.getParentFile().exists()) { if (!CONFIG_FILE.getParentFile().mkdirs()) { return; @@ -183,11 +183,15 @@ public final class Config { private static void settings() { PREFIXGROUPS = getList("settings.prefix-groups", Lists.newArrayList("discord", "socialmedia", "eventteam", "eventleader", "youtube", "twitch", - "developer")); + "developer" + ) + ); CONFLICTINGPREFIXGROUPS = getList("settings.prefix-conflicts-groups", - Lists.newArrayList("eventteam", "eventleader")); + Lists.newArrayList("eventteam", "eventleader") + ); STAFFGROUPS = getList("settings.staff-groups", - Lists.newArrayList("trainee", "moderator", "headmod", "admin", "manager", "owner")); + Lists.newArrayList("trainee", "moderator", "headmod", "admin", "manager", "owner") + ); CONSOLENAME = getString("settings.console-name", CONSOLENAME); CONSOLEUUID = UUID.fromString(getString("settings.console-uuid", CONSOLEUUID.toString())); MINIMIUMSTAFFRANK = getString("settings.minimum-staff-rank", MINIMIUMSTAFFRANK); @@ -282,7 +286,7 @@ public final class Config { public static String NO_PERMISSION = "You don't have permission to use this command."; public static String NO_CONSOLE = "This command can not be used by console"; public static String CREATED_PARTY = "You created a chat party called: " + - "'' with the password: ''"; + "'' with the password: ''"; public static String NOT_IN_A_PARTY = "You're not in a chat party."; public static String NOT_YOUR_PARTY = "You don't own this chat party."; public static String NOT_A_PARTY = "This chat party does not exist."; @@ -307,14 +311,14 @@ public final class Config { public static String ALREADY_IN_THIS_PARTY = "You're already in !"; public static String SENT_PARTY_INV = "You send a chat party invite to !"; public static String JOIN_PARTY_CLICK_MESSAGE = " '>" + - "You received an invite to join , click this message to accept."; + "You received an invite to join , click this message to accept."; public static String PARTY_MEMBER_LOGGED_ON = "[ChatParty] joined Altitude..."; public static String PARTY_MEMBER_LOGGED_OFF = "[ChatParty] left Altitude..."; public static String RENAMED_PARTY = "[ChatParty] changed the party name from to !"; public static String CHANGED_PASSWORD = "Password was set to "; public static String DISBAND_PARTY_CONFIRM = "Are you sure you want to disband your party? " + - "Type /party disband confirm to confirm."; + "Type /party disband confirm to confirm."; public static String DISBANDED_PARTY = "[ChatParty] has disbanded , everyone has been removed."; public static String PARTY_INFO = """ @@ -413,7 +417,8 @@ public final class Config { ConfigurationNode node = getNode("chat-channels"); if (node.empty()) { getString("chat-channels.ac.format", - " >to : "); + " >to : " + ); getList("chat-channels.ac.servers", List.of("lobby")); getBoolean("chat-channels.ac.proxy", false); node = getNode("chat-channels"); @@ -617,11 +622,15 @@ public final class Config { NICK_WAIT_TIME = getLong("nicknames.wait-time", NICK_WAIT_TIME); NICK_ITEM_LORE = getList("nicknames.item-lore", List.of("New nick: ", "Old nick: ", "Last changed: ", - "Left click to Accept | Right click to Deny")); + "Left click to Accept | Right click to Deny" + ) + ); NICK_BLOCKED_COLOR_CODESLIST = getList("nicknames.blocked-color-codes", List.of("&k", "&l", "&n", "&m", "&o")); NICK_ALLOWED_COLOR_CODESLIST = getList("nicknames.allowed-color-codes", List.of("&0", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9", "&a", "&b", "&c", "&d", "&e", "&f", - "&r")); + "&r" + ) + ); NICK_CURRENT = getString("nicknames.messages.nick-current", NICK_CURRENT); } @@ -641,4 +650,10 @@ public final class Config { CHAT_LOG_DELETE_OLDER_THAN_DAYS = getLong("chat-log.delete-older-than-days", CHAT_LOG_DELETE_OLDER_THAN_DAYS); CHAT_LOG_SAVE_DELAY_MINUTES = getLong("chat-log.save-delay-minutes", CHAT_LOG_SAVE_DELAY_MINUTES); } + + public static String CHAT_WEB_SERVER_BASE_URL = "http://10.0.0.121:8080"; + + private static void webServerSettings() { + CHAT_WEB_SERVER_BASE_URL = getString("web-server.base-url", CHAT_WEB_SERVER_BASE_URL); + } }