Record Class PlayerDialogActionEvent
java.lang.Object
java.lang.Record
fr.fidorial.event.player.PlayerDialogActionEvent
- All Implemented Interfaces:
Event, PlayerEvent
public record PlayerDialogActionEvent(Player player, Key id, DialogResponse response)
extends Record
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 Summary
ConstructorsConstructorDescriptionPlayerDialogActionEvent(Player player, Key id, DialogResponse response) Creates an instance of aPlayerDialogActionEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the identifier the action was declared with.player()Returns the value of theplayerrecord component.response()Returns the input values the player submitted, empty for a static custom action.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerDialogActionEvent
Creates an instance of aPlayerDialogActionEventrecord class.- Parameters:
player- the value for theplayerrecord componentid- the value for theidrecord componentresponse- the value for theresponserecord component
-
-
Method Details
-
id
Returns the identifier the action was declared with.- Returns:
- the identifier the action was declared with
- Since:
- 0.1.0
-
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
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
player
Returns the value of theplayerrecord component.- Specified by:
playerin interfacePlayerEvent- Returns:
- the value of the
playerrecord component
-