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

    Constructors
    Constructor
    Description
    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 a Equippable record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable HolderSet
    Returns the value of the allowedEntities record component.
    @Nullable net.kyori.adventure.key.Key
    Returns the value of the cameraOverlay record component.
    boolean
    Returns the value of the damageOnHurt record component.
    boolean
    Returns the value of the dispensable record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the equipOnInteract record component.
    Returns the value of the equipSound record component.
    final int
    Returns a hash code value for this object.
    @Nullable net.kyori.adventure.key.Key
    Returns the value of the model record component.
    Returns the value of the slot record component.
    boolean
    Returns the value of the swappable record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a Equippable record class.
      Parameters:
      slot - the value for the slot record component
      equipSound - the value for the equipSound record component
      model - the value for the model record component
      cameraOverlay - the value for the cameraOverlay record component
      allowedEntities - the value for the allowedEntities record component
      dispensable - the value for the dispensable record component
      swappable - the value for the swappable record component
      damageOnHurt - the value for the damageOnHurt record component
      equipOnInteract - the value for the equipOnInteract record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • slot

      public EquipmentSlot slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component
    • equipSound

      public Sound equipSound()
      Returns the value of the equipSound record component.
      Returns:
      the value of the equipSound record component
    • model

      public @Nullable net.kyori.adventure.key.Key model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • cameraOverlay

      public @Nullable net.kyori.adventure.key.Key cameraOverlay()
      Returns the value of the cameraOverlay record component.
      Returns:
      the value of the cameraOverlay record component
    • allowedEntities

      public @Nullable HolderSet allowedEntities()
      Returns the value of the allowedEntities record component.
      Returns:
      the value of the allowedEntities record component
    • dispensable

      public boolean dispensable()
      Returns the value of the dispensable record component.
      Returns:
      the value of the dispensable record component
    • swappable

      public boolean swappable()
      Returns the value of the swappable record component.
      Returns:
      the value of the swappable record component
    • damageOnHurt

      public boolean damageOnHurt()
      Returns the value of the damageOnHurt record component.
      Returns:
      the value of the damageOnHurt record component
    • equipOnInteract

      public boolean equipOnInteract()
      Returns the value of the equipOnInteract record component.
      Returns:
      the value of the equipOnInteract record component