@MightOccurAsync public interface NucleusTextTemplateEvent extends org.spongepowered.api.event.Event, org.spongepowered.api.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 org.spongepowered.api.text.Text |
getMessageFor(org.spongepowered.api.command.CommandSource source)
Gets the message that would be sent to the specified
CommandSource . |
NucleusTextTemplate |
getOriginalMessage()
Get the original
NucleusTextTemplate . |
Collection<org.spongepowered.api.command.CommandSource> |
getOriginalRecipients()
Get the original recipients to send the message to.
|
Collection<org.spongepowered.api.command.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 org.spongepowered.api.command.CommandSource> recipients)
Set the recipients to send the message to.
|
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<org.spongepowered.api.command.CommandSource> getOriginalRecipients()
Collection<org.spongepowered.api.command.CommandSource> getRecipients()
void setRecipients(Collection<? extends org.spongepowered.api.command.CommandSource> recipients)
recipients
- The recipients.default boolean containsTokens()
default org.spongepowered.api.text.Text getMessageFor(org.spongepowered.api.command.CommandSource source)
CommandSource
.source
- The source