Package com.valhalla.sdk.api.entities
Class NpcDefinition
java.lang.Object
com.valhalla.sdk.api.entities.NpcDefinition
- All Implemented Interfaces:
Identifiable,Nameable
Immutable NPC cache definition from the active adapter's reviewed OSRS
revision. Empty action entries are retained so their list index maps to
NpcAction's native menu slot.-
Constructor Summary
ConstructorsConstructorDescriptionNpcDefinition(int id, String name, List<String> actions) Creates one revision-pinned NPC definition. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindAction(String action) Resolves one exact action label to a typed native action slot.intgetId()Returns the client definition or item identifier captured in this snapshot.getName()Returns the captured display name.booleaninthashCode()toString()
-
Constructor Details
-
NpcDefinition
Creates one revision-pinned NPC definition.- Parameters:
id- cache definition identifiername- exact cache name, including any game markupactions- cache menu slots zero through four, retaining empty slots
-
-
Method Details
-
getId
public int getId()Description copied from interface:IdentifiableReturns the client definition or item identifier captured in this snapshot.- Specified by:
getIdin interfaceIdentifiable- Returns:
- cache definition identifier
-
getName
Description copied from interface:NameableReturns the captured display name. -
getActions
- Returns:
- immutable cache action slots in native menu order
-
findAction
Resolves one exact action label to a typed native action slot.- Returns:
- empty when absent or ambiguous
-
hasAction
- Returns:
- whether an exact action label occurs in this cache definition
-
equals
-
hashCode
public int hashCode() -
toString
-