Interface PluginMessage
public interface PluginMessage
A message received on a channel, from the client of a player or from the proxy on its connection.
- Since:
- 0.1.0
-
Method Summary
-
Method Details
-
player
Player player()Gets the player whose connection carried the message.- Returns:
- the player
- Since:
- 0.1.0
-
channel
-
data
byte[] data()Gets the content of the message.- Returns:
- a copy of the content, at most
PluginMessenger.MAX_RECEIVED_SIZEbytes - Since:
- 0.1.0
-
reply
void reply(byte[] data) Answers on the same channel, through the same connection.- Parameters:
data- the content of the answer, at mostPluginMessenger.MAX_SENT_SIZEbytes- Throws:
IllegalArgumentException- ifdatais null or too large- Since:
- 0.1.0
- See Also:
-