From ec0dde071d2e0d3a15f7d3d27cc84412cd1864fe Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Mon, 28 Feb 2011 00:31:25 +0000 Subject: [PATCH] Implemented Server.getPluginCommand --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 9e6b49b6dd..703a1fc425 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/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; + } + } }