@MightOccurAsync public interface NucleusTextTemplateEvent extends Event, Cancellable
NucleusTextTemplate
s.Modifier and Type | Interface and Description |
---|---|
static interface |
NucleusTextTemplateEvent.Broadcast
Raised when the text being sent originated as a broadcast.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
containsTokens()
Whether the message contains tokens that may be replaced.
|
NucleusTextTemplate |
getMessage()
Get the
NucleusTextTemplate that will be parsed and sent to
players. |
default Text |
getMessageFor(CommandSource source)
Gets the message that would be sent to the specified
CommandSource . |
NucleusTextTemplate |
getOriginalMessage()
Get the original
NucleusTextTemplate . |
Collection<CommandSource> |
getOriginalRecipients()
Get the original recipients to send the message to.
|
Collection<CommandSource> |
getRecipients()
Get the recipients to send the message to.
|
void |
setMessage(NucleusTextTemplate message)
Sets the message to send to the users
getRecipients() |
default void |
setMessage(String message)
Attempts to set the NucleusTextTemplate message using a string.
|
void |
setRecipients(Collection<? extends CommandSource> recipients)
Set the recipients to send the message to.
|
getCause, getContext, getSource
isCancelled, setCancelled
NucleusTextTemplate getMessage()
NucleusTextTemplate
that will be parsed and sent to
players.NucleusTextTemplate getOriginalMessage()
NucleusTextTemplate
.void setMessage(NucleusTextTemplate message)
getRecipients()
message
- The message to send.default void setMessage(String message)
See NucleusMessageTokenService.createFromString(String)
for
creating the tokens. Also see setMessage(NucleusTextTemplate)
.
message
- The message to send.Collection<CommandSource> getOriginalRecipients()
Collection<CommandSource> getRecipients()
void setRecipients(Collection<? extends CommandSource> recipients)
recipients
- The recipients.default boolean containsTokens()
default Text getMessageFor(CommandSource source)
CommandSource
.source
- The source