Record Class ResolvableToolProperties

java.lang.Object
java.lang.Record
org.geysermc.geyser.item.components.resolvable.ResolvableToolProperties
All Implemented Interfaces:
ResolvableComponent<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData>

public record ResolvableToolProperties(org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool properties) extends Record implements ResolvableComponent<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResolvableToolProperties(org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool properties)
    Creates an instance of a ResolvableToolProperties record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool
    Returns the value of the properties record component.
    org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData
     
    final String
    Returns a string representation of this record class.
    org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData>
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.geysermc.geyser.item.components.resolvable.ResolvableComponent

    resolve
  • Constructor Details

    • ResolvableToolProperties

      public ResolvableToolProperties(org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool properties)
      Creates an instance of a ResolvableToolProperties record class.
      Parameters:
      properties - the value for the properties record component
  • Method Details

    • type

      public org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData> type()
      Specified by:
      type in interface ResolvableComponent<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData>
    • resolve

      public org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData resolve(GeyserSession session)
      Specified by:
      resolve in interface ResolvableComponent<org.geysermc.mcprotocollib.protocol.data.game.item.component.ToolData>
    • 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.
    • properties

      public org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component