From 7b427a7710968a7cd4f40640c77b918c2855586b Mon Sep 17 00:00:00 2001 From: stevei5mc <2978383306@qq.com> Date: Mon, 27 May 2024 23:56:58 +0800 Subject: [PATCH] =?UTF-8?q?dev=201.=20=E5=AF=B9=E4=BB=A3=E7=A0=81=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=B0=83=E6=95=B4=202.=20=E4=BF=AE=E5=A4=8Ddebug?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/stevei5mc/NewTipsVariables/Main.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/cn/stevei5mc/NewTipsVariables/Main.java b/src/main/java/cn/stevei5mc/NewTipsVariables/Main.java index a58c9d7..3103b36 100644 --- a/src/main/java/cn/stevei5mc/NewTipsVariables/Main.java +++ b/src/main/java/cn/stevei5mc/NewTipsVariables/Main.java @@ -62,8 +62,10 @@ public void loadConfigRes() { this.configInPlayer = new Config(this.getDataFolder() + "/player.yml", Config.YAML); this.worldName = new Config(this.getDataFolder() + "/world_name.yml", Config.YAML); this.language = new Config(this.getDataFolder() + "/language.yml", Config.YAML); + debug = false; //这个防止出现关闭debug功能reload配置文件后还需要重启服务器的问题 if (config.getBoolean("debug", false)) {//从config.yml中获取debug为true则执行相关内容,如果无法获取则为false - this.deBugMode(); + debug = true; + this.getLogger().warning(debugPrefix + "§cdebug模式已开启"); } if (config.getBoolean("updata.in-config.check")) {//从config.yml中获取updata.in-config.check为true则执行相关内容 ConfigUtils.checkVersion(); @@ -78,11 +80,6 @@ public void loadVarRes() { } } - public void deBugMode() { - debug = true; - this.getLogger().warning(debugPrefix + "§cdebug模式已开启"); - } - public void tipsvariables() { Api.registerVariables("BaseVariables", BaseVariables.class); LoadSupportPlugins.loadSupportVariables(player);