13
0
geforkt von Mirrors/Paper

Teach the API about Remote Consoles

This will allow us to raise events for remote consoles, and provide access
to them at a later date. Relates to BUKKIT-220

By: Andrew Ardill <andrew.ardill@gmail.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-12-07 16:37:35 +11:00
Ursprung 1d06c840a4
Commit a4a2fa8690
3 geänderte Dateien mit 18 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,4 @@
package org.bukkit.command;
public interface RemoteConsoleCommandSender extends CommandSender{
}

Datei anzeigen

@ -505,6 +505,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.server.ServerCommandEvent
*/
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)
*

Datei anzeigen

@ -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;
}
/**