2014-04-06 14:15:47 +02:00
|
|
|
package me.libraryaddict.disguise.commands;
|
|
|
|
|
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandExecutor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
2016-05-09 17:28:38 +02:00
|
|
|
import me.libraryaddict.disguise.LibsDisguises;
|
|
|
|
|
2014-04-06 14:15:47 +02:00
|
|
|
public class LibsDisguisesCommand implements CommandExecutor {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
2015-08-03 00:39:44 +02:00
|
|
|
if (args.length == 0) {
|
|
|
|
sender.sendMessage(ChatColor.DARK_GREEN
|
|
|
|
+ "This server is running "
|
|
|
|
+ "Lib's Disguises v."
|
|
|
|
+ Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion()
|
|
|
|
+ " by libraryaddict, maintained by NavidK0.\n"
|
|
|
|
+ "Use /libsdisguises reload to reload the config. All disguises will be blown by doing this.");
|
|
|
|
} else if (args.length > 0) {
|
|
|
|
if (sender.hasPermission("libsdisguises.reload")) {
|
|
|
|
if (args[0].equalsIgnoreCase("reload")) {
|
2016-02-19 20:23:46 +01:00
|
|
|
LibsDisguises.getInstance().reload();
|
2015-08-03 00:39:44 +02:00
|
|
|
sender.sendMessage(ChatColor.GREEN + "[LibsDisguises] Reloaded config.");
|
|
|
|
return true;
|
2015-07-15 14:27:45 +02:00
|
|
|
} else {
|
2015-08-03 00:39:44 +02:00
|
|
|
sender.sendMessage(ChatColor.RED + "[LibsDisguises] That command doesn't exist!");
|
2015-07-15 14:27:45 +02:00
|
|
|
}
|
2015-08-03 00:39:44 +02:00
|
|
|
} else {
|
|
|
|
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command.");
|
2015-03-30 04:47:29 +02:00
|
|
|
}
|
2015-08-03 00:39:44 +02:00
|
|
|
}
|
2014-04-06 14:15:47 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|