Class PlayerDialogActionEvent

java.lang.Object
fr.fidorial.event.player.PlayerDialogActionEvent
All Implemented Interfaces:
Event, PlayerEvent

public final class PlayerDialogActionEvent extends Object implements PlayerEvent
Fired when a player presses a dialog button carrying a custom or dynamic custom action.
Since:
0.1.0
Since Minecraft:
1.21.6
  • Constructor Details

    • PlayerDialogActionEvent

      public PlayerDialogActionEvent(Player player, Key id, DialogResponse response)
      Parameters:
      player - the player who pressed the button
      id - the identifier declared on the action
      response - the values submitted alongside it
      Since:
      0.1.0
  • Method Details

    • player

      public Player player()
      Specified by:
      player in interface PlayerEvent
    • id

      public Key id()
      Returns the identifier the action was declared with.
      Returns:
      the identifier the action was declared with
      Since:
      0.1.0
    • response

      public DialogResponse response()
      Returns the input values the player submitted, empty for a static custom action.
      Returns:
      the input values the player submitted, empty for a static custom action
      Since:
      0.1.0