2011-05-29 13:25:25 +02:00
|
|
|
package com.Acrobot.ChestShop.Commands;
|
|
|
|
|
2012-11-23 21:02:15 +01:00
|
|
|
import com.Acrobot.Breeze.Configuration.Configuration;
|
2011-05-29 13:25:25 +02:00
|
|
|
import com.Acrobot.ChestShop.ChestShop;
|
2012-11-23 21:02:15 +01:00
|
|
|
import com.Acrobot.ChestShop.Configuration.Messages;
|
|
|
|
import com.Acrobot.ChestShop.Configuration.Properties;
|
2011-08-13 12:08:34 +02:00
|
|
|
import org.bukkit.ChatColor;
|
2011-05-29 13:25:25 +02:00
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandExecutor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Acrobot
|
|
|
|
*/
|
|
|
|
public class Version implements CommandExecutor {
|
|
|
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
2012-03-17 15:00:25 +01:00
|
|
|
if (args.length > 0 && args[0].equals("reload")) {
|
2012-11-23 21:02:15 +01:00
|
|
|
Configuration.pairFileAndClass(ChestShop.loadFile("config.yml"), Properties.class);
|
|
|
|
Configuration.pairFileAndClass(ChestShop.loadFile("local.yml"), Messages.class);
|
|
|
|
|
2012-01-09 22:39:38 +01:00
|
|
|
sender.sendMessage(ChatColor.DARK_GREEN + "The config was reloaded.");
|
|
|
|
return true;
|
|
|
|
}
|
2012-05-10 16:32:25 +02:00
|
|
|
|
2011-08-13 12:08:34 +02:00
|
|
|
sender.sendMessage(ChatColor.GRAY + ChestShop.getPluginName() + "'s version is: " + ChatColor.GREEN + ChestShop.getVersion());
|
2011-05-29 13:25:25 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|