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 GsonComponentSerializer
build()
Builds the serializer.@NotNull GsonComponentSerializer.Builder
downsampleColors()
Sets that the serializer should downsample hex colors to named colors.@NotNull GsonComponentSerializer.Builder
emitLegacyHoverEvent()
default @NotNull GsonComponentSerializer.Builder
legacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer)
Deprecated.for removal since 4.14.0, uselegacyHoverEventSerializer(net.kyori.adventure.text.serializer.json.LegacyHoverEventSerializer)
instead@NotNull GsonComponentSerializer.Builder
legacyHoverEventSerializer(@Nullable LegacyHoverEventSerializer serializer)
-
-
-
Method Detail
-
downsampleColors
@NotNull @NotNull GsonComponentSerializer.Builder downsampleColors()
Sets that the serializer should downsample hex colors to named colors.- Specified by:
downsampleColors
in 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 eventvalue
payloads. If the serializer isnull
, then onlyHoverEvent.Action.SHOW_TEXT
legacy 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:
legacyHoverEventSerializer
in interfaceJSONComponentSerializer.Builder
-
emitLegacyHoverEvent
@NotNull @NotNull GsonComponentSerializer.Builder emitLegacyHoverEvent()
- Specified by:
emitLegacyHoverEvent
in interfaceJSONComponentSerializer.Builder
- Since:
- 4.0.0
-
build
@NotNull @NotNull GsonComponentSerializer build()
Builds the serializer.- Specified by:
build
in interfacenet.kyori.adventure.builder.AbstractBuilder<GsonComponentSerializer>
- Specified by:
build
in interfacenet.kyori.adventure.util.Buildable.Builder<GsonComponentSerializer>
- Specified by:
build
in interfaceJSONComponentSerializer.Builder
- Returns:
- the built serializer
-
-