修复不打开权限组称号无法使用Papi的问题

This commit is contained in:
ZhangYuheng 2024-09-24 15:30:26 +08:00
parent a350e01e4b
commit ca2b42a84d
2 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,7 @@ plugins {
}
group = "cn.lunadeer"
version = "2.9.0-beta"
version = "2.9.1-beta"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))

View File

@ -40,13 +40,12 @@ public final class Dominion extends JavaPlugin {
AutoClean.run();
Cache.instance = new Cache();
if (config.getGroupTitleEnable()) {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new PlaceHolderApi(this);
} else {
XLogger.warn(Translation.Messages_PlaceholderAPINotFound);
config.setGroupTitleEnable(false);
}
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new PlaceHolderApi(this);
}
if (config.getGroupTitleEnable() && !Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
XLogger.warn(Translation.Messages_PlaceholderAPINotFound);
config.setGroupTitleEnable(false);
}
new EventsRegister(this);