Make the reload command actually work
This commit is contained in:
parent
84ea3c1928
commit
5bca346d02
|
|
@ -74,11 +74,13 @@ public class Plugin extends JavaPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void reloadConfig() {
|
public void reloadConfig() {
|
||||||
super.reloadConfig();
|
super.reloadConfig();
|
||||||
|
accentColor = ChatColor.valueOf(getConfig().getString("accent_color"));
|
||||||
saveDefaultConfig();
|
motds = (ArrayList<String>) getConfig().getStringList("motds");
|
||||||
config = getConfig();
|
joinMOTD = (ArrayList<String>) getConfig().getStringList("join_motd");
|
||||||
config.options().copyDefaults(true);
|
serverName = getConfig().getString("server_name");
|
||||||
saveConfig();
|
saveConfig();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String formatDuration(Duration duration) {
|
public String formatDuration(Duration duration) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ public class ReloadCommand implements CommandExecutor {
|
||||||
if (sender != null) {
|
if (sender != null) {
|
||||||
try {
|
try {
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
|
player.sendMessage(ChatColor.GREEN + "Plugin config reloaded!");
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
player.sendMessage(ChatColor.RED + "Hey stupid! Check the console, you fucked up.");
|
player.sendMessage(ChatColor.RED + "Hey stupid! Check the console, you fucked up.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue