Interface ClickEvent.Payload

All Superinterfaces:
net.kyori.examination.Examinable
All Known Subinterfaces:
ClickEvent.Payload.Custom, ClickEvent.Payload.Dialog, ClickEvent.Payload.Int, ClickEvent.Payload.Text
Enclosing class:
ClickEvent

public static interface ClickEvent.Payload extends net.kyori.examination.Examinable
A payload for a click event.
Since:
4.22.0
  • Method Details

    • string

      static @NotNull ClickEvent.Payload.Text string(@NotNull @NotNull String value)
      Creates a text payload.
      Parameters:
      value - the payload value
      Returns:
      the payload
      Since:
      4.22.0
    • integer

      static @NotNull ClickEvent.Payload.Int integer(int integer)
      Creates an integer payload.
      Parameters:
      integer - the integer
      Returns:
      the payload
      Since:
      4.22.0
    • dialog

      static @NotNull ClickEvent.Payload.Dialog dialog(@NotNull @NotNull DialogLike dialog)
      Creates a dialog payload.
      Parameters:
      dialog - the payload value
      Returns:
      the payload
      Since:
      4.22.0
    • custom

      @Deprecated static @NotNull ClickEvent.Payload.Custom custom(@NotNull @NotNull Key key, @NotNull @NotNull String data)
      Deprecated.
      For removal since 4.23.0, payloads hold NBT data, use custom(Key, BinaryTagHolder) instead. This method will create NBT using BinaryTagHolder.binaryTagHolder(String).
      Creates a custom payload.
      Parameters:
      key - the key identifying the payload
      data - the payload data
      Returns:
      the payload
      Since:
      4.22.0
    • custom

      static @NotNull ClickEvent.Payload.Custom custom(@NotNull @NotNull Key key, @NotNull @NotNull BinaryTagHolder nbt)
      Creates a custom payload.

      See BinaryTagHolder.binaryTagHolder(String) for a simple way to create NBT from SNBT. For simple use cases, you can use plain strings directly as SNBT.

      Parameters:
      key - the key identifying the payload
      nbt - the payload nbt data
      Returns:
      the payload
      Since:
      4.23.0