Interface GsonComponentSerializer.Builder

All Superinterfaces:
net.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>
Enclosing interface:
GsonComponentSerializer

public static interface GsonComponentSerializer.Builder
extends net.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>
Since:
4.0.0
  • Method Details

    • downsampleColors

      @NotNull @NotNull GsonComponentSerializer.Builder downsampleColors()
      Sets that the serializer should downsample hex colors to named colors.
      Returns:
      this builder
      Since:
      4.0.0
    • legacyHoverEventSerializer

      @NotNull @NotNull GsonComponentSerializer.Builder legacyHoverEventSerializer​(@Nullable @Nullable LegacyHoverEventSerializer serializer)
      Sets a serializer that will be used to interpret legacy hover event value payloads. If the serializer is null, then only HoverEvent.Action.SHOW_TEXT legacy hover events can be deserialized.
      Parameters:
      serializer - serializer
      Returns:
      this builder
      Since:
      4.0.0
    • emitLegacyHoverEvent

      @NotNull @NotNull GsonComponentSerializer.Builder emitLegacyHoverEvent()
      Output a legacy hover event value in addition to the modern contents.

      A legacy hover serializer must also be set to serialize any hover events beyond those with action HoverEvent.Action.SHOW_TEXT

      Returns:
      this builder
      Since:
      4.0.0
    • build

      @NotNull @NotNull GsonComponentSerializer build()
      Builds the serializer.
      Specified by:
      build in interface net.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>
      Returns:
      the built serializer