mirror of
https://github.com/CarmJos/ScriptItems
synced 2026-06-25 05:21:08 +08:00
feat: 升级到 1.21,并提供folia支持
This commit is contained in:
@@ -65,6 +65,11 @@
|
|||||||
<url>https://mvn.lumine.io/repository/maven-public/</url>
|
<url>https://mvn.lumine.io/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<id>papermc</id>
|
||||||
|
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>carm-repo</id>
|
<id>carm-repo</id>
|
||||||
<name>Carm's Repo</name>
|
<name>Carm's Repo</name>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class Main extends EasyPlugin {
|
|||||||
new Metrics(this, 14615);
|
new Metrics(this, 14615);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PluginConfig.CHECK_UPDATE.getNotNull()) {
|
if (PluginConfig.CHECK_UPDATE.getNotNull() && !isFolia()) {
|
||||||
log("开始检查更新...");
|
log("开始检查更新...");
|
||||||
getScheduler().runAsync(GHUpdateChecker.runner(this));
|
getScheduler().runAsync(GHUpdateChecker.runner(this));
|
||||||
} else {
|
} else {
|
||||||
@@ -99,4 +99,13 @@ public class Main extends EasyPlugin {
|
|||||||
public ConfigurationHolder<?> getMessageProvider() {
|
public ConfigurationHolder<?> getMessageProvider() {
|
||||||
return messageProvider;
|
return messageProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isFolia() {
|
||||||
|
try {
|
||||||
|
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
|
||||||
|
return true;
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user