TabooLib v4.26
+ 调整 TConfiguration 类,增加 runListener 方法运行重载任务 + 调整 ItemBuilder 类,增加玩家皮肤头构造方法 + 调整 TagDataHandler 类,兼容了弱智 BedwarsRel 的计分板冲突 + 调整 SupportWorldGuard 类,新增了获取所有区域的方法。 + 重构 ItemUtils 类,现在更加整洁了。。 + SkullUtils 被赋予尊贵的 @Deprecated + 优化本地通讯网,修复了心跳包的语法错误问题,并新增了 /tclient 命令用于简单的操作通讯网络。
This commit is contained in:
@@ -25,25 +25,27 @@ public class TConfiguration extends YamlConfiguration {
|
||||
TLib.getTLib().getConfigWatcher().addSimpleListener(this.file, this::reload);
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放文件监听
|
||||
*/
|
||||
public void release() {
|
||||
TLib.getTLib().getConfigWatcher().removeListener(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新载入配置
|
||||
*/
|
||||
public void reload() {
|
||||
try {
|
||||
load(file);
|
||||
Optional.ofNullable(runnable).ifPresent(Runnable::run);
|
||||
runListener();
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
TLogger.getGlobalLogger().warn("Cannot load configuration from stream: " + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void runListener() {
|
||||
try {
|
||||
Optional.ofNullable(runnable).ifPresent(Runnable::run);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建配置文件
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user