Record Class NpcType

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.NpcType
Record Components:
id - the NPC type ID
name - the NPC display name
combatLevel - the NPC combat level, or 0 if non-combat
visible - whether the NPC is rendered
clickable - whether the NPC can be interacted with
options - the right-click interaction options
varbitId - the varbit controlling transformation, or -1 if none
varpId - the varp controlling transformation, or -1 if none
transforms - the list of type IDs this NPC can transform into
params - additional key-value parameters from the NPC definition

public record NpcType(int id, String name, int combatLevel, boolean visible, boolean clickable, List<String> options, int varbitId, int varpId, List<Integer> transforms, Map<String,Object> params) extends Record
NPC definition from the game cache.
See Also:
  • Constructor Details

    • NpcType

      public NpcType(int id, String name, int combatLevel, boolean visible, boolean clickable, List<String> options, int varbitId, int varpId, List<Integer> transforms, Map<String,Object> params)
      Creates an instance of a NpcType record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      combatLevel - the value for the combatLevel record component
      visible - the value for the visible record component
      clickable - the value for the clickable record component
      options - the value for the options record component
      varbitId - the value for the varbitId record component
      varpId - the value for the varpId record component
      transforms - the value for the transforms record component
      params - the value for the params 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 the compare method from their corresponding wrapper classes.
      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.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • combatLevel

      public int combatLevel()
      Returns the value of the combatLevel record component.
      Returns:
      the value of the combatLevel record component
    • visible

      public boolean visible()
      Returns the value of the visible record component.
      Returns:
      the value of the visible record component
    • clickable

      public boolean clickable()
      Returns the value of the clickable record component.
      Returns:
      the value of the clickable record component
    • options

      public List<String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component
    • varbitId

      public int varbitId()
      Returns the value of the varbitId record component.
      Returns:
      the value of the varbitId record component
    • varpId

      public int varpId()
      Returns the value of the varpId record component.
      Returns:
      the value of the varpId record component
    • transforms

      public List<Integer> transforms()
      Returns the value of the transforms record component.
      Returns:
      the value of the transforms record component
    • params

      public Map<String,Object> params()
      Returns the value of the params record component.
      Returns:
      the value of the params record component