From 63814427dbd9a54f35b6bef90fabc23fb36d0a5e Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 23 Jun 2021 19:46:06 -0400 Subject: [PATCH] Fix config reload command --- .../net/seanomik/tamablefoxes/CommandSpawnTamableFox.java | 1 + .../main/java/net/seanomik/tamablefoxes/util/io/Config.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/CommandSpawnTamableFox.java b/Plugin/src/main/java/net/seanomik/tamablefoxes/CommandSpawnTamableFox.java index 82850fd..79b872c 100644 --- a/Plugin/src/main/java/net/seanomik/tamablefoxes/CommandSpawnTamableFox.java +++ b/Plugin/src/main/java/net/seanomik/tamablefoxes/CommandSpawnTamableFox.java @@ -57,6 +57,7 @@ public class CommandSpawnTamableFox implements TabExecutor { break; case "reload": plugin.reloadConfig(); + Config.reloadConfig(plugin); LanguageConfig.getConfig(plugin).reloadConfig(); player.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getReloadMessage()); break; diff --git a/Utility/src/main/java/net/seanomik/tamablefoxes/util/io/Config.java b/Utility/src/main/java/net/seanomik/tamablefoxes/util/io/Config.java index b8b7c91..f48b861 100644 --- a/Utility/src/main/java/net/seanomik/tamablefoxes/util/io/Config.java +++ b/Utility/src/main/java/net/seanomik/tamablefoxes/util/io/Config.java @@ -3,10 +3,16 @@ package net.seanomik.tamablefoxes.util.io; import org.bukkit.ChatColor; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; public class Config { private static FileConfiguration config = null; + public static void reloadConfig(Plugin plugin) { + plugin.reloadConfig(); + Config.config = plugin.getConfig(); + } + public static void setConfig(FileConfiguration config) { Config.config = config; }