refactor: remove the englishLanguage.json
This commit is contained in:
parent
ed15e9b023
commit
832a391ad0
4 changed files with 6 additions and 6889 deletions
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
Loading…
Reference in a new issue