Fix config reload command
This commit is contained in:
parent
d2b586feea
commit
63814427db
|
@ -57,6 +57,7 @@ public class CommandSpawnTamableFox implements TabExecutor {
|
||||||
break;
|
break;
|
||||||
case "reload":
|
case "reload":
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
|
Config.reloadConfig(plugin);
|
||||||
LanguageConfig.getConfig(plugin).reloadConfig();
|
LanguageConfig.getConfig(plugin).reloadConfig();
|
||||||
player.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getReloadMessage());
|
player.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getReloadMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3,10 +3,16 @@ package net.seanomik.tamablefoxes.util.io;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
private static FileConfiguration config = null;
|
private static FileConfiguration config = null;
|
||||||
|
|
||||||
|
public static void reloadConfig(Plugin plugin) {
|
||||||
|
plugin.reloadConfig();
|
||||||
|
Config.config = plugin.getConfig();
|
||||||
|
}
|
||||||
|
|
||||||
public static void setConfig(FileConfiguration config) {
|
public static void setConfig(FileConfiguration config) {
|
||||||
Config.config = config;
|
Config.config = config;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue