49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package pl.sloudpl.sloudchat.cmds;
|
|
|
|
import net.md_5.bungee.api.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
import pl.sloudpl.sloudchat.SloudChat;
|
|
import pl.sloudpl.sloudchat.utils.ColorUtils;
|
|
|
|
public class SloudChatCMD1_16 implements CommandExecutor {
|
|
|
|
SloudChat plugin;
|
|
|
|
public SloudChatCMD1_16(SloudChat plugin){
|
|
this.plugin = plugin;
|
|
plugin.getCommand("sloudchat").setExecutor(this);
|
|
}
|
|
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
|
|
|
if(args.length == 1){
|
|
|
|
if(args[0].equalsIgnoreCase("reload")){
|
|
if(sender.hasPermission("sloudpl.reload")){
|
|
|
|
plugin.reloadConfig();
|
|
sender.sendMessage(ChatColor.GREEN + "Config was reloaded!");
|
|
|
|
} else {
|
|
sender.sendMessage(ColorUtils.convertHexColors(ChatColor.translateAlternateColorCodes('&', plugin.nopermission)));
|
|
}
|
|
|
|
} else {
|
|
|
|
sender.sendMessage(ChatColor.RED + "Usage: /sloudchat reload");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
sender.sendMessage(ChatColor.RED + "Usage: /sloudchat reload");
|
|
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
}
|