public interface CommandSource extends Subject
Examples of potential implementations include players, the server console, Rcon clients, web-based clients, command blocks, and so on.
Modifier and Type | Method and Description |
---|---|
MessageSink |
getMessageSink()
Return the message sink that messages from this source should be broadcast to.
|
String |
getName()
Gets the name identifying this command source.
|
void |
sendMessage(Iterable<Text> messages)
Sends the formatted text message(s) to source when possible.
|
void |
sendMessage(Text... messages)
Sends the formatted text message(s) to source when possible.
|
void |
setMessageSink(MessageSink sink)
Set the message sink that messages sent by this source should be broadcast to.
|
getActiveContexts, getCommandSource, getContainingCollection, getIdentifier, getParents, getParents, getPermissionValue, getSubjectData, getTransientSubjectData, hasPermission, hasPermission, isChildOf, isChildOf
String getName()
void sendMessage(Text... messages)
messages
- The message(s)void sendMessage(Iterable<Text> messages)
messages
- The messagesMessageSink getMessageSink()
void setMessageSink(MessageSink sink)
sink
- The message sink to broadcast messages to