diff options
3 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/command/RemoteConsoleCommandSender.java b/src/main/java/org/bukkit/command/RemoteConsoleCommandSender.java new file mode 100644 index 00000000..5ba3c438 --- /dev/null +++ b/src/main/java/org/bukkit/command/RemoteConsoleCommandSender.java @@ -0,0 +1,4 @@ +package org.bukkit.command; + +public interface RemoteConsoleCommandSender extends CommandSender{ +} diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java index 25271f73..a5aab336 100644 --- a/src/main/java/org/bukkit/event/Event.java +++ b/src/main/java/org/bukkit/event/Event.java @@ -506,6 +506,12 @@ public abstract class Event implements Serializable { */ SERVER_COMMAND (Category.SERVER), /** + * Called when a remote server command is called + * + * @see org.bukkit.event.server.ServerCommandEvent + */ + REMOTE_COMMAND(Category.SERVER), + /** * Called when a map is initialized (created or loaded into memory) * * @see org.bukkit.event.server.MapInitializeEvent diff --git a/src/main/java/org/bukkit/event/server/ServerCommandEvent.java b/src/main/java/org/bukkit/event/server/ServerCommandEvent.java index 2d87be99..b33044ed 100644 --- a/src/main/java/org/bukkit/event/server/ServerCommandEvent.java +++ b/src/main/java/org/bukkit/event/server/ServerCommandEvent.java @@ -9,10 +9,15 @@ import org.bukkit.command.ConsoleCommandSender; public class ServerCommandEvent extends ServerEvent { private String command; private CommandSender sender; + @Deprecated public ServerCommandEvent(ConsoleCommandSender console, String message) { - super(Type.SERVER_COMMAND); - command = message; - sender = console; + this(Type.SERVER_COMMAND, console, message); + } + + public ServerCommandEvent(Type type, CommandSender sender, String command) { + super(type); + this.command = command; + this.sender = sender; } /** |