Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
添加对前置插件tips的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
stevei5mc committed Jun 21, 2023
1 parent 5b159c9 commit 0abe5ec
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cn.stevei5mc</groupId>
<artifactId>UnicodeVariables</artifactId>
<version>1.0.0-beta3</version>
<version>1.0.0</version>

<repositories>
<repository>
Expand Down
68 changes: 37 additions & 31 deletions src/main/java/cn/stevei5mc/UnicodeVariables/main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cn.stevei5mc.UnicodeVariables;

import cn.nukkit.plugin.PluginBase;
import cn.nukkit.plugin.PluginManager;
import tip.utils.Api;
import cn.stevei5mc.UnicodeVariables.ucodee0;
import cn.stevei5mc.UnicodeVariables.ucodee1;
Expand Down Expand Up @@ -30,37 +31,42 @@

public class main extends PluginBase {
public void onEnable() {
Api.registerVariables("ucodee0", ucodee0.class);
Api.registerVariables("ucodee1", ucodee1.class);
Api.registerVariables("ucodee2", ucodee2.class);
Api.registerVariables("ucodee3", ucodee3.class);
Api.registerVariables("ucodee4", ucodee4.class);
Api.registerVariables("ucodee5", ucodee5.class);
Api.registerVariables("ucodee6", ucodee6.class);
Api.registerVariables("ucodee7", ucodee7.class);
Api.registerVariables("ucodee8", ucodee8.class);
Api.registerVariables("ucodee9", ucodee9.class);
Api.registerVariables("ucodeea", ucodee0.class);
Api.registerVariables("ucodeeb", ucodee1.class);
Api.registerVariables("ucodeec", ucodee2.class);
Api.registerVariables("ucodeed", ucodee3.class);
Api.registerVariables("ucodeee", ucodee4.class);
Api.registerVariables("ucodeef", ucodee5.class);
Api.registerVariables("ucodef0", ucodef0.class);
Api.registerVariables("ucodef1", ucodef1.class);
Api.registerVariables("ucodef2", ucodef2.class);
Api.registerVariables("ucodef3", ucodef3.class);
Api.registerVariables("ucodef4", ucodef4.class);
Api.registerVariables("ucodef5", ucodef5.class);
Api.registerVariables("ucodef6", ucodef6.class);
Api.registerVariables("ucodef7", ucodef7.class);
Api.registerVariables("ucodef8", ucodef8.class);
this.getLogger().info("UnicodeVariables 加载成功");
this.getLogger().info("§a支持显示范围 §eglyph_E0 §a==>> §eglyph_F8");
this.getLogger().warning("§c警告:");
this.getLogger().warning("§c本插件为免费且开源的一款插件,如果你是付费获取到的那么你就被骗了");
this.getLogger().info("§a开源链接和使用方法:");
this.getLogger().info("§bhttps://github.com/stevei5mc/UnicodeVariables");
if (this.getServer().getPluginManager().getPlugin("Tips") != null) {
Api.registerVariables("ucodee0", ucodee0.class);
Api.registerVariables("ucodee1", ucodee1.class);
Api.registerVariables("ucodee2", ucodee2.class);
Api.registerVariables("ucodee3", ucodee3.class);
Api.registerVariables("ucodee4", ucodee4.class);
Api.registerVariables("ucodee5", ucodee5.class);
Api.registerVariables("ucodee6", ucodee6.class);
Api.registerVariables("ucodee7", ucodee7.class);
Api.registerVariables("ucodee8", ucodee8.class);
Api.registerVariables("ucodee9", ucodee9.class);
Api.registerVariables("ucodeea", ucodee0.class);
Api.registerVariables("ucodeeb", ucodee1.class);
Api.registerVariables("ucodeec", ucodee2.class);
Api.registerVariables("ucodeed", ucodee3.class);
Api.registerVariables("ucodeee", ucodee4.class);
Api.registerVariables("ucodeef", ucodee5.class);
Api.registerVariables("ucodef0", ucodef0.class);
Api.registerVariables("ucodef1", ucodef1.class);
Api.registerVariables("ucodef2", ucodef2.class);
Api.registerVariables("ucodef3", ucodef3.class);
Api.registerVariables("ucodef4", ucodef4.class);
Api.registerVariables("ucodef5", ucodef5.class);
Api.registerVariables("ucodef6", ucodef6.class);
Api.registerVariables("ucodef7", ucodef7.class);
Api.registerVariables("ucodef8", ucodef8.class);
this.getLogger().info("UnicodeVariables 加载成功");
this.getLogger().info("§a支持显示范围 §eglyph_E0 §a==>> §eglyph_F8");
this.getLogger().warning("§c警告:");
this.getLogger().warning("§c本插件为免费且开源的一款插件,如果你是付费获取到的那么你就被骗了");
this.getLogger().info("§a开源链接和使用方法:");
this.getLogger().info("§bhttps://github.com/stevei5mc/UnicodeVariables");
} else {
this.getLogger().warning("§c未检测到前置插件§aTips§c,请安装§aTips§c再试!!!");
this.onDisable();
}
}

public void onDisable() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: UnicodeVariables
main: cn.stevei5mc.UnicodeVariables.main
version: "1.0.0-beta3"
version: '1.0.0'
author: stevei5mc
api: ["1.0.0"]

0 comments on commit 0abe5ec

Please sign in to comment.