@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 . |
java.util.Collection<org.spongepowered.api.command.CommandSource> |
getOriginalRecipients()
Get the original recipients to send the message to.
|
java.util.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() |
void |
setMessage(java.lang.String message)
Attempts to set the NucleusTextTemplate message using a string.
|
void |
setRecipients(java.util.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.void setMessage(java.lang.String message)
See NucleusTextTemplateFactory.createFromString(String)
for
creating the tokens. Also see setMessage(NucleusTextTemplate)
.
message
- The message to send.java.util.Collection<org.spongepowered.api.command.CommandSource> getOriginalRecipients()
java.util.Collection<org.spongepowered.api.command.CommandSource> getRecipients()
void setRecipients(java.util.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