Record Class PEDialogPayload
java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.packetevents.payload.PEDialogPayload
- All Implemented Interfaces:
DialogPayload
public record PEDialogPayload(UUID owner, com.github.retrooper.packetevents.protocol.nbt.NBTCompound compound)
extends Record
implements DialogPayload
-
Constructor Summary
ConstructorsConstructorDescriptionPEDialogPayload
(UUID owner, com.github.retrooper.packetevents.protocol.nbt.NBTCompound compound) Creates an instance of aPEDialogPayload
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Boolean
booleanValue
(String key) Get the boolean value from the payloadcom.github.retrooper.packetevents.protocol.nbt.NBTCompound
compound()
Returns the value of thecompound
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.map()
Get the map of all values in the payload@Nullable Number
numberValue
(String key) Get the number value from the payloadowner()
Returns the value of theowner
record component.@Nullable String
Get the text value from the payloadfinal String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PEDialogPayload
public PEDialogPayload(UUID owner, com.github.retrooper.packetevents.protocol.nbt.NBTCompound compound) Creates an instance of aPEDialogPayload
record class.- Parameters:
owner
- the value for theowner
record componentcompound
- the value for thecompound
record component
-
-
Method Details
-
textValue
Description copied from interface:DialogPayload
Get the text value from the payload- Specified by:
textValue
in interfaceDialogPayload
- Parameters:
key
- the key to search for- Returns:
- the text, or null if the key doesn't exist in the payload
-
booleanValue
Description copied from interface:DialogPayload
Get the boolean value from the payload- Specified by:
booleanValue
in interfaceDialogPayload
- Parameters:
key
- the key to search for- Returns:
- the boolean, or null if the key doesn't exist in the payload
-
numberValue
Description copied from interface:DialogPayload
Get the number value from the payload- Specified by:
numberValue
in interfaceDialogPayload
- Parameters:
key
- the key to search for- Returns:
- the number, or null if the key doesn't exist in the payload or the value is not a number
-
map
Description copied from interface:DialogPayload
Get the map of all values in the payload- Specified by:
map
in interfaceDialogPayload
- Returns:
- the map
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
owner
Returns the value of theowner
record component.- Specified by:
owner
in interfaceDialogPayload
- Returns:
- the value of the
owner
record component
-
compound
public com.github.retrooper.packetevents.protocol.nbt.NBTCompound compound()Returns the value of thecompound
record component.- Returns:
- the value of the
compound
record component
-