Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
1. 修改部分提示内容
2. 删除一些空格
  • Loading branch information
stevei5mc committed May 10, 2024
1 parent 884c4c3 commit f5e53ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
15 changes: 6 additions & 9 deletions src/main/java/cn/stevei5mc/NewTipsVariables/Main.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cn.stevei5mc.NewTipsVariables;

import cn.nukkit.plugin.PluginBase;
import cn.nukkit.plugin.PluginManager;
import tip.utils.Api;
import cn.stevei5mc.NewTipsVariables.variables.BaseVariables;
import cn.stevei5mc.NewTipsVariables.variables.LoadSupportPlugins;
Expand All @@ -20,17 +19,17 @@ public class Main extends PluginBase {
private Config worldName;
private Config language;
public static boolean debug = false;

public static Main getInstance() {
return instance;
}

public void onLoad() {
instance = this;
this.loadConfigRes();//加载配置文件
this.loadVarRes();//加载变量文档
}

public void onEnable() {
//判断需要的前置插件是否存在
if (this.getServer().getPluginManager().getPlugin("Tips") != null) {
Expand All @@ -48,12 +47,11 @@ public void onEnable() {
}

public void onDisable() {
this.getLogger().info("停止运行");
this.getLogger().info("§6感谢你的使用");
this.getLogger().info("已停止运行,感谢你的使用");
}

public void loadConfigRes() {
this.getDataFolder().mkdirs(); //创建插件文件夹
this.getDataFolder().mkdirs();
this.saveDefaultConfig();
this.saveResource("server.yml",false);
this.saveResource("player.yml",false);
Expand Down Expand Up @@ -92,8 +90,7 @@ public void tipsvariables() {

public void loadover() {
this.getLogger().info("§a变量加载完成");
this.getLogger().warning("§c警告:");
this.getLogger().warning("§c本插件为免费且开源的一款插件,如果你是付费获取到的那么你就被骗了");
this.getLogger().warning("§c警告! §c本插件为免费且开源的一款插件,如果你是付费获取到的那么你就被骗了");
this.getLogger().info("§a开源链接和使用方法: §bhttps://github.com/stevei5mc/NewTipsVariables");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ public static void checkConfig() {
} else {
Main.getInstance().getLogger().info("§aconfig.yml 版本是最新版");
}

if (cpvl > cpvt) {
Main.getInstance().getLogger().warning("§eplayer.yml 版本不是最新版");
} else if (cpvl < cpvt) {
Main.getInstance().getLogger().error("§cplayer.yml 版本出现了错误");
} else {
Main.getInstance().getLogger().info("§aplayer.yml 版本是最新版");
}

if (csvt > csvt) {
Main.getInstance().getLogger().warning("§eserver.yml 版本不是最新版");
} else if (csvt < csvt) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static String getPlayerPing(Player player) {
playerMS = playerPingMediumColor + pingValue;
}else {
playerMS = playerPingLowColor + pingValue;
}
}
return playerMS;
}
//获取玩家的生命值状态
Expand Down

0 comments on commit f5e53ea

Please sign in to comment.