Record Class GhostEquipment

java.lang.Object
java.lang.Record
com.iantapply.conflux.api.GhostEquipment
Record Components:
mainHand - item held in the main hand, or an empty string
offHand - item held in the offhand, or an empty string
feet - boots worn by the player, or an empty string
legs - leggings worn by the player, or an empty string
chest - chestplate worn by the player, or an empty string
head - helmet worn by the player, or an empty string

public record GhostEquipment(String mainHand, String offHand, String feet, String legs, String chest, String head) extends Record
Base64-encoded Bukkit item stacks worn or held by a remote player.
  • Field Details

    • EMPTY

      public static final GhostEquipment EMPTY
      Equipment state in which every slot is empty.
  • Constructor Details

    • GhostEquipment

      public GhostEquipment(String mainHand, String offHand, String feet, String legs, String chest, String head)
      Validates and creates a ghost equipment snapshot.
  • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • mainHand

      public String mainHand()
      Returns the value of the mainHand record component.
      Returns:
      the value of the mainHand record component
    • offHand

      public String offHand()
      Returns the value of the offHand record component.
      Returns:
      the value of the offHand record component
    • feet

      public String feet()
      Returns the value of the feet record component.
      Returns:
      the value of the feet record component
    • legs

      public String legs()
      Returns the value of the legs record component.
      Returns:
      the value of the legs record component
    • chest

      public String chest()
      Returns the value of the chest record component.
      Returns:
      the value of the chest record component
    • head

      public String head()
      Returns the value of the head record component.
      Returns:
      the value of the head record component