Record Class NbtDialog
java.lang.Object
java.lang.Record
org.geysermc.adventure.text.serializer.nbt.NbtDialog
- Record Components:
reference- a reference to a dialog loaded in the"minecraft:dialog"registryinline- an inline-defined dialog, serialized asCompoundTag
- All Implemented Interfaces:
net.kyori.adventure.dialog.DialogLike
public record NbtDialog(Optional<net.kyori.adventure.key.Key> reference, Optional<com.viaversion.nbt.tag.CompoundTag> inline)
extends Record
implements net.kyori.adventure.dialog.DialogLike
Represents a dialog. This can hold either a
Key reference to a dialog loaded in the "minecraft:dialog" registry, or an
inline-defined dialog serialized as CompoundTag. Instances of this record will always hold one of the two, never both, and never none.- See Also:
-
Constructor Summary
Constructors -
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.Optional<com.viaversion.nbt.tag.CompoundTag> inline()Returns the value of theinlinerecord component.Optional<net.kyori.adventure.key.Key> Returns the value of thereferencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NbtDialog
-
NbtDialog
public NbtDialog(net.kyori.adventure.key.Key reference) -
NbtDialog
public NbtDialog(com.viaversion.nbt.tag.CompoundTag inline)
-
-
Method Details
-
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). -
reference
-
inline
-