Class CommandMessageRenderer
java.lang.Object
tech.guilhermekaua.spigotboot.commands.message.CommandMessageRenderer
Renders a
CommandMessageException into the final message string: the active
CommandMessageSource template if it supplies one, otherwise the key's default
template, then placeholder interpolation.-
Constructor Summary
ConstructorsConstructorDescriptionCommandMessageRenderer(CommandMessageSourceProvider sourceProvider) Creates a renderer backed by the given source provider. -
Method Summary
Modifier and TypeMethodDescriptionrender(CommandExecutionContext context, CommandMessageException exception)
-
Constructor Details
-
CommandMessageRenderer
Creates a renderer backed by the given source provider.- Parameters:
sourceProvider- provider used to resolve the activeCommandMessageSource; must not benull- Throws:
NullPointerException- ifsourceProviderisnull
-
-
Method Details
-
render
- Parameters:
context- the current execution context; must not benullexception- the keyed failure to render; must not benull- Returns:
- the message to send to the sender
-