public class MessageSinks extends Object
Constructor and Description |
---|
MessageSinks() |
Modifier and Type | Method and Description |
---|---|
static MessageSink |
combined(MessageSink... sinks)
A message sink that targets all subjects contained within the given sinks
and applies the message transformations of each sink in order (so with n
sinks,
sinks[n-1].transformMessage(sinks[n-2].transformMessage(sinks[...]
.transformMessage(sinks[0].transformMessage(input)))) would occur) |
static MessageSink |
to(Set<CommandSource> sources)
Get a message sink that targets the given sources.
|
static MessageSink |
toAll()
A message sink that targets all subjects currently active.
|
static MessageSink |
toAllPlayers()
A message sink that targets all players currently active.
|
static MessageSink |
toNone()
An empty message sink.
|
static MessageSink |
toPermission(String permission)
A message sink that targets all subjects with the given permission.
|
public static MessageSink toPermission(String permission)
permission
- The permission to targetpublic static MessageSink toAll()
public static MessageSink toAllPlayers()
public static MessageSink toNone()
public static MessageSink combined(MessageSink... sinks)
sinks[n-1].transformMessage(sinks[n-2].transformMessage(sinks[...]
.transformMessage(sinks[0].transformMessage(input))))
would occur)sinks
- The sinks to combinepublic static MessageSink to(Set<CommandSource> sources)
sources
- The sources to have as recipients