mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 11:28:59 +08:00
新增版本更新检查
This commit is contained in:
parent
6c5ed0b2d1
commit
32033616fd
@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "cn.lunadeer"
|
||||
version = "2.3.1-beta"
|
||||
version = "2.3.2-beta"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
|
@ -141,6 +141,9 @@ public class Commands implements TabExecutor {
|
||||
case "title_list":
|
||||
TitleList.show(sender, args);
|
||||
break;
|
||||
case "version":
|
||||
Operator.version(sender, args);
|
||||
break;
|
||||
// ---=== Sub Command ===---
|
||||
case "member":
|
||||
Member.handle(sender, args);
|
||||
|
@ -4,6 +4,7 @@ import cn.lunadeer.dominion.Cache;
|
||||
import cn.lunadeer.dominion.Dominion;
|
||||
import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||
import cn.lunadeer.dominion.utils.MapRender;
|
||||
import cn.lunadeer.minecraftpluginutils.GiteaReleaseCheck;
|
||||
import cn.lunadeer.minecraftpluginutils.Notification;
|
||||
import cn.lunadeer.minecraftpluginutils.Scheduler;
|
||||
import cn.lunadeer.minecraftpluginutils.XLogger;
|
||||
@ -138,6 +139,13 @@ public class Operator {
|
||||
});
|
||||
}
|
||||
|
||||
public static void version(CommandSender sender, String[] args) {
|
||||
if (!hasPermission(sender, "dominion.admin")) {
|
||||
return;
|
||||
}
|
||||
GiteaReleaseCheck.instance.getLatestRelease();
|
||||
}
|
||||
|
||||
private static int convertWorld2Mca(int world) {
|
||||
return world < 0 ? world / 512 - 1 : world / 512;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user