From a8b4f1d95077056af4f7ba9c16c09e1ce6249349 Mon Sep 17 00:00:00 2001 From: Wilee999 Date: Wed, 15 May 2013 20:56:18 -0700 Subject: [PATCH] Removed /cmdlist (useless) --- .../Commands/Command_cmdlist.java | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java deleted file mode 100644 index 70a111b6..00000000 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java +++ /dev/null @@ -1,51 +0,0 @@ -package me.StevenLawson.TotalFreedomMod.Commands; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import org.apache.commons.lang.StringUtils; -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.PluginDescriptionFile; - -@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH) -@CommandParameters(description = "Show all commands for all server plugins.", usage = "/") -public class Command_cmdlist extends TFM_Command -{ - @Override - public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) - { - List commands = new ArrayList(); - - for (Plugin p : server.getPluginManager().getPlugins()) - { - try - { - PluginDescriptionFile desc = p.getDescription(); - Map> map = (Map>) desc.getCommands(); - - if (map != null) - { - for (Entry> entry : map.entrySet()) - { - String command_name = (String) entry.getKey(); - commands.add(command_name); - } - } - } - catch (Throwable ex) - { - } - } - - Collections.sort(commands); - - sender.sendMessage(StringUtils.join(commands, ",")); - - return true; - } -}