9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-28 03:09:14 +00:00

update libs

This commit is contained in:
XiaoMoMi
2024-10-12 21:47:58 +08:00
parent d0b057b391
commit bd6caee58f
3 changed files with 14 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.translation.Translator;
import net.momirealms.customnameplates.common.plugin.CustomNameplatesProperties;
import net.momirealms.customnameplates.common.plugin.NameplatesPlugin;
import net.momirealms.customnameplates.common.util.Pair;
import org.jetbrains.annotations.Nullable;
@@ -39,7 +40,6 @@ public class TranslationManager {
private static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
private static Locale FORCE_LOCALE = null;
private static final List<String> locales = List.of("en", "zh_cn");
private static TranslationManager instance;
private final NameplatesPlugin plugin;
@@ -63,7 +63,9 @@ public class TranslationManager {
MiniMessageTranslator.translator().removeSource(this.registry);
this.installed.clear();
}
for (String lang : locales) {
String supportedLocales = CustomNameplatesProperties.getValue("lang");
for (String lang : supportedLocales.split(",")) {
this.plugin.getConfigManager().saveResource("translations/" + lang + ".yml");
}

View File

@@ -27,4 +27,5 @@ h2-driver=${h2_driver_version}
sqlite-driver=${sqlite_driver_version}
byte-buddy=${byte_buddy_version}
commons-io=${commons_io_version}
lwjgl=${lwjgl_version}
lwjgl=${lwjgl_version}
lang=${lang}