From 6280efc7537085749e116c7a58c0eedf5640d4d5 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 28 Feb 2011 00:31:25 +0000 Subject: [PATCH] Implemented Server.getPluginCommand By: Dinnerbone --- .../main/java/org/bukkit/craftbukkit/CraftServer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 9e6b49b6dd..703a1fc425 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -287,4 +287,14 @@ public final class CraftServer implements Server { public ConsoleReader getReader() { return console.reader; } + + public PluginCommand getPluginCommand(String name) { + Command command = commandMap.getCommand(name); + + if (command instanceof PluginCommand) { + return (PluginCommand)command; + } else { + return null; + } + } }