mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-01-12 00:24:27 +08:00
新增检查更新配置开关
This commit is contained in:
parent
ee7a2e7911
commit
3725a791e3
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.16.3-beta</version>
|
||||
<version>1.16.4-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -34,10 +34,13 @@ public final class Dominion extends JavaPlugin {
|
||||
Objects.requireNonNull(Bukkit.getPluginCommand("dominion")).setExecutor(new Commands());
|
||||
|
||||
Metrics metrics = new Metrics(this, 21445);
|
||||
GiteaReleaseCheck giteaReleaseCheck = new GiteaReleaseCheck(this,
|
||||
"https://ssl.lunadeer.cn:14446",
|
||||
"zhangyuheng",
|
||||
"Dominion");
|
||||
GiteaReleaseCheck giteaReleaseCheck = null;
|
||||
if (config.getCheckUpdate()) {
|
||||
giteaReleaseCheck = new GiteaReleaseCheck(this,
|
||||
"https://ssl.lunadeer.cn:14446",
|
||||
"zhangyuheng",
|
||||
"Dominion");
|
||||
}
|
||||
|
||||
XLogger.info("领地插件已启动");
|
||||
XLogger.info("版本:" + this.getPluginMeta().getVersion());
|
||||
|
@ -58,6 +58,7 @@ public class ConfigManager {
|
||||
_limit_amount = _file.getInt("Limit.Amount", 10);
|
||||
_limit_depth = _file.getInt("Limit.Depth", 10);
|
||||
_world_black_list = _file.getStringList("WorldBlackList");
|
||||
_check_update = _file.getBoolean("CheckUpdate", true);
|
||||
}
|
||||
|
||||
public Boolean isDebug() {
|
||||
@ -222,6 +223,10 @@ public class ConfigManager {
|
||||
return _world_black_list;
|
||||
}
|
||||
|
||||
public Boolean getCheckUpdate() {
|
||||
return _check_update;
|
||||
}
|
||||
|
||||
|
||||
private final Dominion _plugin;
|
||||
private FileConfiguration _file;
|
||||
@ -247,4 +252,5 @@ public class ConfigManager {
|
||||
private Integer _limit_amount;
|
||||
private Integer _limit_depth;
|
||||
private List<String> _world_black_list;
|
||||
private Boolean _check_update;
|
||||
}
|
||||
|
@ -25,4 +25,6 @@ AutoCleanAfterDays: 180
|
||||
|
||||
BlueMap: true
|
||||
|
||||
CheckUpdate: true
|
||||
|
||||
Debug: false
|
Loading…
Reference in New Issue
Block a user