Interface GsonComponentSerializer.Builder
-
- All Superinterfaces:
net.kyori.adventure.builder.AbstractBuilder<GsonComponentSerializer>,net.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>,JSONComponentSerializer.Builder
- Enclosing interface:
- GsonComponentSerializer
public static interface GsonComponentSerializer.Builder extends net.kyori.adventure.builder.AbstractBuilder<GsonComponentSerializer>, net.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>, JSONComponentSerializer.Builder
A builder forGsonComponentSerializer.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description @NotNull GsonComponentSerializerbuild()Builds the serializer.@NotNull GsonComponentSerializer.BuilderdownsampleColors()Sets that the serializer should downsample hex colors to named colors.@NotNull GsonComponentSerializer.BuilderemitLegacyHoverEvent()default @NotNull GsonComponentSerializer.BuilderlegacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer)Deprecated.for removal since 4.14.0, uselegacyHoverEventSerializer(net.kyori.adventure.text.serializer.json.LegacyHoverEventSerializer)instead@NotNull GsonComponentSerializer.BuilderlegacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer)
-
-
-
Method Detail
-
downsampleColors
@NotNull @NotNull GsonComponentSerializer.Builder downsampleColors()
Sets that the serializer should downsample hex colors to named colors.- Specified by:
downsampleColorsin interfaceJSONComponentSerializer.Builder- Returns:
- this builder
- Since:
- 4.0.0
-
legacyHoverEventSerializer
@Deprecated @NotNull default @NotNull GsonComponentSerializer.Builder legacyHoverEventSerializer(@Nullable @Nullable LegacyHoverEventSerializer serializer)
Deprecated.for removal since 4.14.0, uselegacyHoverEventSerializer(net.kyori.adventure.text.serializer.json.LegacyHoverEventSerializer)insteadSets 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.- Parameters:
serializer- serializer- Returns:
- this builder
- Since:
- 4.0.0
-
legacyHoverEventSerializer
@NotNull @NotNull GsonComponentSerializer.Builder legacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer)
- Specified by:
legacyHoverEventSerializerin interfaceJSONComponentSerializer.Builder
-
emitLegacyHoverEvent
@NotNull @NotNull GsonComponentSerializer.Builder emitLegacyHoverEvent()
- Specified by:
emitLegacyHoverEventin interfaceJSONComponentSerializer.Builder- Since:
- 4.0.0
-
build
@NotNull @NotNull GsonComponentSerializer build()
Builds the serializer.- Specified by:
buildin interfacenet.kyori.adventure.builder.AbstractBuilder<GsonComponentSerializer>- Specified by:
buildin interfacenet.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>- Specified by:
buildin interfaceJSONComponentSerializer.Builder- Returns:
- the built serializer
-
-