forked from github-mirror/CoreProtect
Fixed AdvancedChests causing circular load order (fixes #831)
This commit is contained in:
1 parent
a90b0ea18a
commit
ff36b6e0e6
2 files changed
+4
-5
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();
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user