Class SocialChatRenderer.Builder<T>
java.lang.Object
ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.Builder<T>
- Type Parameters:
T- the audience target type
- Enclosing interface:
SocialChatRenderer<T>
Builder for
SocialChatRenderer.Registered wrappers around a SocialChatRenderer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns theSocialChatRenderer.Registeredwrapper.Sets the function used to map anAudienceto a target of typeT.renderIf(Predicate<SocialRegisteredMessageContext> renderIf) Sets a predicate that controls whether this renderer runs for a given message.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
renderIf
Sets a predicate that controls whether this renderer runs for a given message.- Parameters:
renderIf- the predicate; the renderer is skipped when this returnsfalse- Returns:
- this builder
-
map
Sets the function used to map anAudienceto a target of typeT.- Parameters:
map- the mapping function; returnSocialChatRenderer.MapResult.ignore()to silently skip rendering- Returns:
- this builder
-
build
Builds and returns theSocialChatRenderer.Registeredwrapper.- Returns:
- the registered renderer
-