From 3104ba1b486ee0a4875c0da54f76938d80b2be22 Mon Sep 17 00:00:00 2001 From: Acrobot Date: Fri, 23 Nov 2012 21:02:15 +0100 Subject: [PATCH] Changed /chestshop reload to work with new config --- com/Acrobot/ChestShop/Commands/Version.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/com/Acrobot/ChestShop/Commands/Version.java b/com/Acrobot/ChestShop/Commands/Version.java index 995fbbd..3842e3d 100644 --- a/com/Acrobot/ChestShop/Commands/Version.java +++ b/com/Acrobot/ChestShop/Commands/Version.java @@ -1,7 +1,9 @@ package com.Acrobot.ChestShop.Commands; +import com.Acrobot.Breeze.Configuration.Configuration; import com.Acrobot.ChestShop.ChestShop; -import com.Acrobot.ChestShop.Config.Config; +import com.Acrobot.ChestShop.Configuration.Messages; +import com.Acrobot.ChestShop.Configuration.Properties; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -13,7 +15,9 @@ import org.bukkit.command.CommandSender; public class Version implements CommandExecutor { public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (args.length > 0 && args[0].equals("reload")) { - Config.setup(); + Configuration.pairFileAndClass(ChestShop.loadFile("config.yml"), Properties.class); + Configuration.pairFileAndClass(ChestShop.loadFile("local.yml"), Messages.class); + sender.sendMessage(ChatColor.DARK_GREEN + "The config was reloaded."); return true; }