/
SubSendCommandEvent.java
61 lines (53 loc) · 1.38 KB
/
SubSendCommandEvent.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package net.ME1312.SubServers.Sync.Event;
import net.ME1312.SubServers.Sync.Library.SubEvent;
import net.ME1312.Galaxi.Library.Util;
import net.md_5.bungee.api.plugin.Event;
import java.util.UUID;
/**
* Send Command Event
*/
public class SubSendCommandEvent extends Event implements SubEvent {
private UUID player;
private String server;
private String command;
/**
* Server Command Event
*
* @param player Player Commanding Server
* @param server Server being Commanded
*/
public SubSendCommandEvent(UUID player, String server, String command) {
if (Util.isNull(server, command)) throw new NullPointerException();
this.player = player;
this.server = server;
this.command = command;
}
/**
* Gets the Server Effected
*
* @return The Server Effected
*/
public String getServer() { return server; }
/**
* Gets the player that triggered the Event
*
* @return The Player that triggered this Event or null if Console
*/
public UUID getPlayer() { return player; }
/**
* Gets the Command to Send
*
* @return Command to Send
*/
public String getCommand() {
return command;
}
/**
* Sets the Command to be Sent
*
* @param value Value
*/
public void setCommand(String value) {
command = value;
}
}