Interface GsonDataComponentValue
-
- All Superinterfaces:
DataComponentValue
,net.kyori.examination.Examinable
@NonExtendable public interface GsonDataComponentValue extends DataComponentValue
AnDataComponentValue
implementation that holds a JsonElement.This holder is exposed to allow conversions to/from gson data holders.
- Since:
- 4.17.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.kyori.adventure.text.event.DataComponentValue
DataComponentValue.Removed, DataComponentValue.TagSerializable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull com.google.gson.JsonElement
element()
The contained element, intended for read-only use.static GsonDataComponentValue
gsonDataComponentValue(@NotNull com.google.gson.JsonElement data)
Create a box for item data that can be understood by the gson serializer.
-
-
-
Method Detail
-
gsonDataComponentValue
static GsonDataComponentValue gsonDataComponentValue(@NotNull @NotNull com.google.gson.JsonElement data)
Create a box for item data that can be understood by the gson serializer.- Parameters:
data
- the item data to hold- Returns:
- a newly created item data holder instance
- Since:
- 4.17.0
-
element
@NotNull @NotNull com.google.gson.JsonElement element()
The contained element, intended for read-only use.- Returns:
- a copy of the contained element
- Since:
- 4.17.0
-
-