mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-01 21:07:34 +01:00
Changed /chestshop reload to work with new config
This commit is contained in:
parent
4252ede145
commit
3104ba1b48
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user