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