Character

Represents a player or npc entity

Types

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun adjustCameraTo(): Boolean
Moves the camera to a position where the given entity or position is in view.
Link copied to clipboard
abstract fun click(): Boolean
Interacts with the entity, with the first action available.
abstract fun click(action: String): Boolean
Interacts with the entity, given a specific action.
Link copied to clipboard
open fun distance(): Int
Determines the distance between this entity/tile and the local player
Link copied to clipboard
open fun distanceTo(position: Positionable): Int
Determines the distance between this entity/tile and the given entity/tile
Link copied to clipboard
abstract fun getAnimation(): Int
Gets the character's current animation
Link copied to clipboard
abstract fun getCombatLevel(): Int
Gets the combat level of the character.
Link copied to clipboard
abstract fun getEffects(): List<Integer>
Gets the IDs representing the current effects applied to the player, or empty if none exist.
Link copied to clipboard
abstract fun getHealthBarPercent(): Double
Gets the current percent of the health bar that is green
Link copied to clipboard
abstract fun getHitsplats(): List<Hitsplat>
Gets the hitsplats currently displayed on this character
Link copied to clipboard
abstract fun getIndex(): Int
Gets the index of the entity.
Link copied to clipboard
Gets the Character that this character is interacting with (attacking, following, etc).
Link copied to clipboard
abstract fun getModel(): Optional<Model>
Gets the entity model
Link copied to clipboard
abstract fun getName(): String
Determines the name of the entity of the object this method is called on.
Link copied to clipboard
abstract fun getNextTile(): Optional<Tile>
Gets the next tile this character will be at, if it is moving
Link copied to clipboard
Gets the orientation of this entity
Link copied to clipboard
Link copied to clipboard
abstract fun getOverheadMessage(): String
Gets the message displayed above this character, such as a public chat message
Link copied to clipboard
abstract fun getTile(): WorldTile
Gets the WorldTile of this entity/position
Link copied to clipboard
Gets the direction this character is walking
Link copied to clipboard
abstract fun hasHintArrow(): Boolean
Determines if a hint arrow is pointing to this character.
Link copied to clipboard
abstract fun hover(): Boolean
Moves the mouse to a human-randomized point on the entity.
open fun hover(action: String): Boolean
Hovers the specified action on this entity.
Link copied to clipboard
open fun hoverMenu(action: String): Boolean
Hovers the specified action on this entity, always right-clicking and hovering over the menu
Link copied to clipboard
open fun interact(action: String): Boolean
open fun interact(action: String, interruptCondition: BooleanSupplier): Boolean
Attempts to interact with the entity using the given action.
Link copied to clipboard
open fun isAnimating(): Boolean
Checks if the character is currently animating
Link copied to clipboard
abstract fun isFacing(position: Positionable): Boolean
Determines if this character is facing a given position.
Link copied to clipboard
abstract fun isHealthBarVisible(): Boolean
Determines if the health bar interface is appearing over this character's head.
Link copied to clipboard
open fun isHovering(): Boolean
Checks if the mouse is currently over this entity
Link copied to clipboard
abstract fun isInteracting(): Boolean
Determines if this character is interacting with any another character.
Link copied to clipboard
Determines if this character is interacting with the player.
Link copied to clipboard
abstract fun isMoving(): Boolean
Determines if the character is moving or not.
Link copied to clipboard
abstract fun isVisible(): Boolean
Determines if the entity is on the screen and able to be clicked.