refactor: remove the englishLanguage.json

This commit is contained in:
Chayapak 2024-11-15 19:59:27 +07:00
parent ed15e9b023
commit 832a391ad0
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA
4 changed files with 6 additions and 6889 deletions

View file

@ -2,6 +2,7 @@ package me.chayapak1.chomens_bot;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import me.chayapak1.chomens_bot.plugins.ConsolePlugin;
import me.chayapak1.chomens_bot.util.ComponentUtilities;
import me.chayapak1.chomens_bot.util.HttpUtilities;
import me.chayapak1.chomens_bot.util.LoggerUtilities;
import me.chayapak1.chomens_bot.util.PersistentDataUtilities;
@ -9,6 +10,7 @@ import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.kyori.adventure.text.Component;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
@ -156,7 +158,9 @@ public class Main {
bots.add(bot);
}
// fard
// fards
ComponentUtilities.stringify(Component.empty()); // best way to initialize the class 2024
new ConsolePlugin(bots, config, jda);
} catch (Exception e) {
e.printStackTrace();

View file

@ -278,7 +278,7 @@ public class NBSConverter implements Converter {
private static final Map<String, String> subtitles = new HashMap<>();
static {
for (Map.Entry<String, String> entry : ComponentUtilities.englishLanguage.entrySet()) {
for (Map.Entry<String, String> entry : ComponentUtilities.language.entrySet()) {
if (!entry.getKey().startsWith("subtitles.")) continue;
subtitles.put(entry.getKey(), entry.getValue());

View file

@ -26,7 +26,6 @@ public class ComponentUtilities {
// component parsing
public static final Map<String, String> language = loadJsonStringMap("language.json");
public static final Map<String, String> englishLanguage = loadJsonStringMap("englishLanguage.json");
private static final Map<String, String> voiceChatLanguage = loadJsonStringMap("voiceChatLanguage.json");
private static final Map<String, String> keybinds = loadJsonStringMap("keybinds.json");
@ -64,9 +63,6 @@ public class ComponentUtilities {
String lastColor
) {}
private ComponentUtilities () {
}
private static Map<String, String> loadJsonStringMap (String name) {
Map<String, String> map = new HashMap<>();

File diff suppressed because it is too large Load diff