Fix config reload command
This commit is contained in:
parent
d2b586feea
commit
63814427db
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue