Skip to content

Commit

Permalink
Added Server Name Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
beanbeanjuice committed Aug 16, 2024
1 parent c0ec818 commit ce8b52c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.beanbeanjuice.simpleproxychat.utility.config;

import com.beanbeanjuice.simpleproxychat.utility.Tuple;
import com.beanbeanjuice.simpleproxychat.utility.helper.Helper;
import com.beanbeanjuice.simpleproxychat.utility.helper.ServerChatLockHelper;
import dev.dejvokep.boostedyaml.YamlDocument;
Expand Down Expand Up @@ -110,7 +111,8 @@ private void readConfig() throws IOException {
Section aliasSection = yamlConfig.getSection("aliases");
aliasSection.getKeys().stream()
.map((key) -> (String) key)
.forEach((key) -> aliases.put(key, aliasSection.getString(key)));
.map((key) -> Tuple.of(key, aliasSection.getString(key)))
.forEach((pair) -> aliases.put(pair.getKey(), Helper.translateLegacyCodes(pair.getValue())));
config.put(ConfigDataKey.ALIASES, aliases);
config.put(ConfigDataKey.USE_PERMISSIONS, yamlConfig.getBoolean("use-permissions"));
config.put(ConfigDataKey.PROXY_MESSAGE_PREFIX, yamlConfig.getString("proxy-message-prefix"));
Expand Down

0 comments on commit ce8b52c

Please sign in to comment.