Adds methods for getting raw messages from the string formatter
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good
This commit is contained in:
parent
7dc0315469
commit
17fd61e8b9
@ -148,6 +148,27 @@ public final class StringFormatter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the raw, unformatted translation of the given translatable message
|
||||||
|
*
|
||||||
|
* @param translatableMessage <p>The message to get the translation of</p>
|
||||||
|
* @return <p>The raw translation</p>
|
||||||
|
*/
|
||||||
|
public @NotNull String getUnformattedMessage(@NotNull TranslatableMessage translatableMessage) {
|
||||||
|
return this.translator.getTranslatedMessage(translatableMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the unformatted translation of the given translatable message, with translated color codes
|
||||||
|
*
|
||||||
|
* @param translatableMessage <p>The message to get the colored translation of</p>
|
||||||
|
* @return <p>The colored raw translation</p>
|
||||||
|
*/
|
||||||
|
public @NotNull String getUnformattedColoredMessage(@NotNull TranslatableMessage translatableMessage) {
|
||||||
|
return ColorHelper.translateColorCodes(this.translator.getTranslatedMessage(translatableMessage),
|
||||||
|
this.colorConversion);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces a placeholder in a translatable message
|
* Replaces a placeholder in a translatable message
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user