Skip to content

Commit

Permalink
1.1.5 升级依赖,优化更新检查和提醒消息
Browse files Browse the repository at this point in the history
  • Loading branch information
handy-git committed Oct 25, 2024
1 parent 178a204 commit 962eb29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

<groupId>cn.handyplus.region</groupId>
<artifactId>ip2region</artifactId>
<version>1.1.4</version>
<version>1.1.5</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spigot-api.vesion>1.21-R0.1-SNAPSHOT</spigot-api.vesion>
<lombok.version>1.18.32</lombok.version>
<HandyLib.version>3.10.1</HandyLib.version>
<lombok.version>1.18.34</lombok.version>
<HandyLib.version>3.12.6</HandyLib.version>
<ip2region.version>2.7.0</ip2region.version>
<placeholderapi.version>2.10.5</placeholderapi.version>
</properties>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/cn/handyplus/region/Ip2region.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import cn.handyplus.lib.InitApi;
import cn.handyplus.lib.constants.BaseConstants;
import cn.handyplus.lib.util.MessageUtil;
import cn.handyplus.region.constants.BaseIpConstants;
import cn.handyplus.region.hook.PlaceholderUtil;
import cn.handyplus.region.util.ConfigUtil;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

/**
Expand All @@ -31,10 +31,10 @@ public void onEnable() {
.initCommand("cn.handyplus.region.command")
.enableSql("cn.handyplus.region.enter")
.addMetrics(16650)
.checkVersion(ConfigUtil.CONFIG.getBoolean(BaseConstants.IS_CHECK_UPDATE), BaseIpConstants.PLUGIN_VERSION_URL);
.checkVersion(ConfigUtil.CONFIG.getBoolean(BaseConstants.IS_CHECK_UPDATE));

MessageUtil.sendConsoleMessage("§a已成功载入服务器!");
MessageUtil.sendConsoleMessage("§aAuthor:handy WIKI: https://ricedoc.handyplus.cn/wiki/ip2region/README/");
MessageUtil.sendConsoleMessage(ChatColor.GREEN + "已成功载入服务器!");
MessageUtil.sendConsoleMessage(ChatColor.GREEN + "Author:handy WIKI: https://ricedoc.handyplus.cn/wiki/ip2region/README/");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
*/
public abstract class BaseIpConstants {

/**
* 检查更新的版本url
*/
public final static String PLUGIN_VERSION_URL = "https://api.github.com/repos/handy-git/ip2region/releases/latest";

/**
* 玩家地区
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void onOpPlayerJoin(PlayerJoinEvent event) {
if (!ConfigUtil.CONFIG.getBoolean(BaseConstants.IS_CHECK_UPDATE_TO_OP_MSG)) {
return;
}
HandyHttpUtil.checkVersion(event.getPlayer(), BaseIpConstants.PLUGIN_VERSION_URL);
HandyHttpUtil.checkVersion(event.getPlayer());
}

}
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Ip2region
main: cn.handyplus.region.Ip2region
version: 1.1.4
version: 1.1.5
author: handy
api-version: 1.13
website: https://ricedoc.handyplus.cn/wiki/ip2region/log
Expand Down

0 comments on commit 962eb29

Please sign in to comment.