-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConnectionAPI.java
79 lines (70 loc) · 1.98 KB
/
ConnectionAPI.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package de.cubeside.connection;
import java.util.Collection;
import java.util.UUID;
public interface ConnectionAPI {
/**
* Get a collection of all servers
*
* @return a collection of all servers
*/
public Collection<GlobalServer> getServers();
/**
* Get this server
*
* @return this server
*/
public GlobalServer getThisServer();
/**
* Get a server by name
*
* @param name
* the name of the server
* @return the server with that name or null if not found
*/
public GlobalServer getServer(String name);
/**
* Get a collection of all players
*
* @return a collection of all players
*/
public Collection<GlobalPlayer> getPlayers();
/**
* Get a player by UUID
*
* @param uuid
* the players UUID
* @return the player or null if not found
*/
public GlobalPlayer getPlayer(UUID uuid);
/**
* Get a player by name
*
* @param name
* the name of the player
* @return the player or null if not found
*/
public GlobalPlayer getPlayer(String name);
/**
* Sends some data to all servers.
* The channel name should use the format <i>plugin.subchannel</i>.
* This message will not be sent to restriced servers.
*
* @param channel
* the channel to use. may not be null
* @param data
* the data to send. may not be null
*/
public void sendData(String channel, byte[] data);
/**
* Sends some data to all servers.
* The channel name should use the format <i>plugin.subchannel</i>.
*
* @param channel
* the channel to use. may not be null
* @param data
* the data to send. may not be null
* @param sendToRestriced
* send this message to restricted servers too.
*/
public void sendData(String channel, byte[] data, boolean sendToRestriced);
}