Interface GsonDataComponentValue

All Superinterfaces:
DataComponentValue, net.kyori.examination.Examinable

@NonExtendable public interface GsonDataComponentValue extends DataComponentValue
An DataComponentValue 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

    Modifier and Type
    Method
    Description
    @NotNull com.google.gson.JsonElement
    The contained element, intended for read-only use.
    gsonDataComponentValue(@NotNull com.google.gson.JsonElement data)
    Create a box for item data that can be understood by the gson serializer.

    Methods inherited from interface net.kyori.examination.Examinable

    examinableName, examinableProperties, examine
  • Method Details

    • 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