1.0.1:Fix bug:[21:01:10 INFO]: [PBL] §a========================================

[21:01:10 INFO]: [PBL] §ePlayerBlockLife v1.0.1-1.20.4 已启用
              [21:01:10 INFO]: [PBL] §e作者: [YourName]
              [21:01:10 INFO]: [PBL] §a========================================
This commit is contained in:
xiaobai
2026-02-13 22:03:17 +08:00
parent f899540449
commit 8b502459b0
10 changed files with 737 additions and 138 deletions

View File

@@ -11,6 +11,7 @@ public class PlayerBlockLife extends JavaPlugin {
private SkinManager skinManager;
private LifeSystem lifeSystem;
private ConfigManager configManager;
private MessageManager messageManager;
@Override
public void onEnable() {
@@ -21,12 +22,14 @@ public class PlayerBlockLife extends JavaPlugin {
// 第二步:初始化管理器(注意顺序!)
this.configManager = new ConfigManager(this);
this.messageManager = new MessageManager(this);
this.skinManager = new SkinManager(this);
this.blockManager = new PlayerBlockManager(this, skinManager);
this.lifeSystem = new LifeSystem(this);
// 第三步:加载数据(必须在管理器初始化之后)
this.configManager.loadConfig();
this.messageManager.loadMessages();
// 第四步:注册事件监听器
getServer().getPluginManager().registerEvents(new BlockBreakListener(this), this);
@@ -83,6 +86,9 @@ public class PlayerBlockLife extends JavaPlugin {
if (configManager != null) {
configManager.reloadConfig();
}
if (messageManager != null) {
messageManager.reloadMessages();
}
if (blockManager != null) {
blockManager.loadData();
}
@@ -139,6 +145,10 @@ public class PlayerBlockLife extends JavaPlugin {
return configManager;
}
public MessageManager getMessageManager() {
return messageManager;
}
public void logInfo(String message) {
getLogger().info(message);
}