Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.server;
2
3import org.bukkit.command.CommandSender;
4import org.bukkit.command.ConsoleCommandSender;
5
6/**
7 * Server Command events
8 */
9public class ServerCommandEvent extends ServerEvent {
10 private String command;
11 private CommandSender sender;
12
13 public ServerCommandEvent(ConsoleCommandSender console, String message) {
14 super(Type.SERVER_COMMAND);
15 command = message;
16 sender = console;
17 }
18
19 /**
20 * Gets the command that the user is attempting to execute from the console
21 *
22 * @return Command the user is attempting to execute
23 */
24 public String getCommand() {
25 return command;
26 }
27
28 /**
29 * Sets the command that the server will execute
30 *
31 * @param message New message that the server will execute
32 */
33 public void setCommand(String message) {
34 this.command = message;
35 }
36
37 /**
38 * Get the command sender.
39 */
40 public CommandSender getSender() {
41 return sender;
42 }
43}