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
    • 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