Interface GsonComponentSerializer.Builder
- All Superinterfaces:
AbstractBuilder<GsonComponentSerializer>, JSONComponentSerializer.Builder
- Enclosing interface:
GsonComponentSerializer
public static interface GsonComponentSerializer.Builder
extends AbstractBuilder<GsonComponentSerializer>, JSONComponentSerializer.Builder
A builder for
GsonComponentSerializer.- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the serializer.editOptions(Consumer<net.kyori.option.OptionState.Builder> optionEditor) Edit the active set of serializer options.legacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer) Sets a serializer that will be used to interpret legacy hover eventvaluepayloads.options(net.kyori.option.OptionState flags) Set the option state to apply on this serializer.
-
Method Details
-
options
Description copied from interface:JSONComponentSerializer.BuilderSet the option state to apply on this serializer.This controls how the serializer emits and interprets components.
- Specified by:
optionsin interfaceJSONComponentSerializer.Builder- Parameters:
flags- the flag set to use- Returns:
- this builder
- See Also:
-
editOptions
GsonComponentSerializer.Builder editOptions(Consumer<net.kyori.option.OptionState.Builder> optionEditor) Description copied from interface:JSONComponentSerializer.BuilderEdit the active set of serializer options.- Specified by:
editOptionsin interfaceJSONComponentSerializer.Builder- Parameters:
optionEditor- the consumer operating on the existing flag set- Returns:
- this builder
- See Also:
-
legacyHoverEventSerializer
GsonComponentSerializer.Builder legacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer) Description copied from interface:JSONComponentSerializer.BuilderSets a serializer that will be used to interpret legacy hover eventvaluepayloads. If the serializer isnull, then onlyHoverEvent.Action.SHOW_TEXTlegacy hover events can be deserialized.- Specified by:
legacyHoverEventSerializerin interfaceJSONComponentSerializer.Builder- Parameters:
serializer- serializer- Returns:
- this builder
-
build
GsonComponentSerializer build()Builds the serializer.- Specified by:
buildin interfaceAbstractBuilder<GsonComponentSerializer>- Specified by:
buildin interfaceJSONComponentSerializer.Builder- Returns:
- the built serializer
-