Fixed AdvancedChests causing circular load order (fixes #831)

This commit is contained in:
Intelli committed 2026-04-22 23:00:49 -06:00
1 parent a90b0ea18a
commit ff36b6e0e6
2 files changed
+5 -6

No files matched your search

@@ -2,6 +2,7 @@ package net.coreprotect;
import java.io.File;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import net.coreprotect.config.ConfigHandler;
@@ -16,8 +17,6 @@ import net.coreprotect.utility.Chat;
public final class CoreProtect extends JavaPlugin {
private static CoreProtect instance;
private boolean advancedChestsEnabled = false;
/**
* Get the instance of CoreProtect
*
@@ -44,7 +43,6 @@ public final class CoreProtect extends JavaPlugin {
instance = this;
ConfigHandler.path = this.getDataFolder().getPath() + File.separator;
advancedChestsEnabled = getServer().getPluginManager().getPlugin("AdvancedChests") != null;
// Initialize plugin using the initialization service
boolean initialized = PluginInitializationService.initializePlugin(this);
@@ -61,6 +59,7 @@ public final class CoreProtect extends JavaPlugin {
}
public boolean isAdvancedChestsEnabled() {
return advancedChestsEnabled;
Plugin advancedChests = getServer().getPluginManager().getPlugin("AdvancedChests");
return advancedChests != null && advancedChests.isEnabled();
}
}
+2 -2
View File
@@ -6,7 +6,7 @@ api-version: 1.16
folia-supported: true
website: http://coreprotect.net
author: Intelli
softdepend: [WorldEdit,AdvancedChests]
softdepend: [WorldEdit]
description: >
Provides block protection for your server.
commands:
@@ -143,4 +143,4 @@ permissions:
default: op
coreprotect.networking:
description: Has permission to use the networking API
default: op
default: op