@Nonnull @Immutable public final class TranslationMessage extends Object implements ParameterMessage
Message.Type| Constructor and Description |
|---|
TranslationMessage(String name,
Collection<String> replacements)
Creates a new translated message.
|
TranslationMessage(String name,
Object... replacements)
Creates a new translated message.
|
TranslationMessage(String name,
String... replacements)
Creates a new translated message.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getMessage()
Returns the name of the message to use.
|
String[] |
getParameters()
Returns an immutable list of replacements for this message.
|
Message.Type |
getType() |
int |
hashCode() |
boolean |
needsTranslating() |
String |
toString() |
public TranslationMessage(@Nonnull String name, @Nonnull Collection<String> replacements)
name - the name of the messagereplacements - the replacements to usepublic TranslationMessage(@Nonnull String name, @Nonnull Object... replacements)
name - the name of the messagereplacements - the replacements to usepublic String[] getParameters()
getParameters in interface ParameterMessagepublic String getMessage()
getMessage in interface Messagepublic Message.Type getType()
public boolean needsTranslating()
needsTranslating in interface MessageCopyright © 2017–2018 NukkitX. All rights reserved.