You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently placeholders in messages are handled through String.format this approach is rather limited. Problems with the current implementation:
It's impossible to support RGB colors in placeholders
Formatting in placeholders is broken if it is split across 2 lines
Adding JSON in placeholders is impossible
String.format does not allow for format caching
It's possible to create broken messages way to easy
PAPI integration is really unsafe
Data for placeholders has to be retrieved, even when it's not used
The new interface should use proper placeholders instead of replaceAll.
There will be a IPlaceholderFormatter interface, that gets implemented by the user and it retrieves and formats the placeholder on demand. The placeholder resolver will be registered with the message via this method: void registerPlaceholder(String placeholderName, IPlaceholderResolver placeholderResolver)
The text was updated successfully, but these errors were encountered:
Currently placeholders in messages are handled through String.format this approach is rather limited. Problems with the current implementation:
The new interface should use proper placeholders instead of
replaceAll
.There will be a
IPlaceholderFormatter
interface, that gets implemented by the user and it retrieves and formats the placeholder on demand. The placeholder resolver will be registered with the message via this method:void registerPlaceholder(String placeholderName, IPlaceholderResolver placeholderResolver)
The text was updated successfully, but these errors were encountered: