Record Class Equippable
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.Equippable
public record Equippable(EquipmentSlot slot, Sound equipSound, @Nullable net.kyori.adventure.key.Key model, @Nullable net.kyori.adventure.key.Key cameraOverlay, @Nullable HolderSet allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt, boolean equipOnInteract)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEquippable(EquipmentSlot slot, Sound equipSound, @Nullable net.kyori.adventure.key.Key model, @Nullable net.kyori.adventure.key.Key cameraOverlay, @Nullable HolderSet allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt, boolean equipOnInteract) Creates an instance of aEquippablerecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable HolderSetReturns the value of theallowedEntitiesrecord component.@Nullable net.kyori.adventure.key.KeyReturns the value of thecameraOverlayrecord component.booleanReturns the value of thedamageOnHurtrecord component.booleanReturns the value of thedispensablerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theequipOnInteractrecord component.Returns the value of theequipSoundrecord component.final inthashCode()Returns a hash code value for this object.@Nullable net.kyori.adventure.key.Keymodel()Returns the value of themodelrecord component.slot()Returns the value of theslotrecord component.booleanReturns the value of theswappablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Equippable
public Equippable(EquipmentSlot slot, Sound equipSound, @Nullable net.kyori.adventure.key.Key model, @Nullable net.kyori.adventure.key.Key cameraOverlay, @Nullable HolderSet allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt, boolean equipOnInteract) Creates an instance of aEquippablerecord class.- Parameters:
slot- the value for theslotrecord componentequipSound- the value for theequipSoundrecord componentmodel- the value for themodelrecord componentcameraOverlay- the value for thecameraOverlayrecord componentallowedEntities- the value for theallowedEntitiesrecord componentdispensable- the value for thedispensablerecord componentswappable- the value for theswappablerecord componentdamageOnHurt- the value for thedamageOnHurtrecord componentequipOnInteract- the value for theequipOnInteractrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
equipSound
Returns the value of theequipSoundrecord component.- Returns:
- the value of the
equipSoundrecord component
-
model
public @Nullable net.kyori.adventure.key.Key model()Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
cameraOverlay
public @Nullable net.kyori.adventure.key.Key cameraOverlay()Returns the value of thecameraOverlayrecord component.- Returns:
- the value of the
cameraOverlayrecord component
-
allowedEntities
Returns the value of theallowedEntitiesrecord component.- Returns:
- the value of the
allowedEntitiesrecord component
-
dispensable
public boolean dispensable()Returns the value of thedispensablerecord component.- Returns:
- the value of the
dispensablerecord component
-
swappable
public boolean swappable()Returns the value of theswappablerecord component.- Returns:
- the value of the
swappablerecord component
-
damageOnHurt
public boolean damageOnHurt()Returns the value of thedamageOnHurtrecord component.- Returns:
- the value of the
damageOnHurtrecord component
-
equipOnInteract
public boolean equipOnInteract()Returns the value of theequipOnInteractrecord component.- Returns:
- the value of the
equipOnInteractrecord component
-