Name optimized
DataUtils => Local PlayerDataManager => LocalPlayer NMSHandler => NMS HikariHandler => DBSource
This commit is contained in:
@@ -2,7 +2,7 @@ package io.izzel.taboolib.module.locale;
|
||||
|
||||
import io.izzel.taboolib.TabooLib;
|
||||
import io.izzel.taboolib.module.locale.logger.TLoggerManager;
|
||||
import io.izzel.taboolib.module.nms.NMSHandler;
|
||||
import io.izzel.taboolib.module.nms.NMS;
|
||||
import io.izzel.taboolib.module.tellraw.TellrawCreator;
|
||||
import io.izzel.taboolib.util.Ref;
|
||||
import io.izzel.taboolib.util.Strings;
|
||||
@@ -96,11 +96,11 @@ public class TLocale {
|
||||
}
|
||||
|
||||
public static void sendTitle(Player player, String title, String subTitle, int fadein, int stay, int fadeout) {
|
||||
NMSHandler.getHandler().sendTitle(player, title, fadein, stay, fadeout, subTitle, fadein, stay, fadeout);
|
||||
NMS.getHandler().sendTitle(player, title, fadein, stay, fadeout, subTitle, fadein, stay, fadeout);
|
||||
}
|
||||
|
||||
public static void sendActionBar(Player player, String text) {
|
||||
NMSHandler.getHandler().sendActionBar(player, text);
|
||||
NMS.getHandler().sendActionBar(player, text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,13 +74,13 @@ public class TLocaleLoader {
|
||||
return;
|
||||
}
|
||||
// 加载文件
|
||||
YamlConfiguration localeConfiguration = Files.loadYaml(plugin, localeFile);
|
||||
YamlConfiguration localeConfiguration = Files.loadYaml(localeFile);
|
||||
YamlConfiguration localeConfigurationAtStream = getLocaleAtStream(plugin, localeFile);
|
||||
// 载入配置
|
||||
loadPluginLocale(plugin, localeFile, localeConfiguration, localeConfigurationAtStream);
|
||||
// 注册监听
|
||||
TConfigWatcher.getInst().removeListener(localeFile);
|
||||
TConfigWatcher.getInst().addListener(localeFile, null, obj -> loadPluginLocale(plugin, localeFile, Files.loadYaml(plugin, localeFile), getLocaleAtStream(plugin, localeFile)));
|
||||
TConfigWatcher.getInst().addListener(localeFile, null, obj -> loadPluginLocale(plugin, localeFile, Files.loadYaml(localeFile), getLocaleAtStream(plugin, localeFile)));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errorLogger("ERROR-LOADING-LANG", plugin.getName(), e.toString() + "\n" + e.getStackTrace()[0].toString());
|
||||
|
||||
Reference in New Issue
Block a user