Fix logging error when using /reload

This commit is contained in:
filoghost 2021-04-04 12:51:47 +02:00
parent f15011580e
commit 2ec403ba8e
1 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,8 @@ public class ChestCommands extends BaseJavaPlugin {
@Override
protected void onCheckedEnable() throws PluginEnableException {
Log.setLogger(getLogger());
if (!ReflectionUtils.isClassLoaded("org.bukkit.inventory.ItemFlag")) { // ItemFlag was added in 1.8
if (Bukkit.getVersion().contains("(MC: 1.8)")) {
throw new PluginEnableException("ChestCommands requires a more recent version of Bukkit 1.8 to run.");
@ -75,7 +77,6 @@ public class ChestCommands extends BaseJavaPlugin {
pluginInstance = this;
dataFolderPath = getDataFolder().toPath();
Log.setLogger(getLogger());
configManager = new ConfigManager(getDataFolderPath());
placeholders = new CustomPlaceholders();