Player

Represents a player (such as yourself, or another player)

See also

Constructors

Link copied to clipboard
constructor(player: RSPlayer)

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Moves the camera to a position where the given entity or position is in view.
Link copied to clipboard
open fun click(): Boolean
Interacts with the entity, with the first action available.
open 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
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun getAnimation(): Int
Gets the character's current animation
Link copied to clipboard
open fun getCombatLevel(): Int
Gets the combat level of the character.
Link copied to clipboard
open fun getEffects(): List<Integer>
Gets the IDs representing the current effects applied to the player, or empty if none exist.
Link copied to clipboard
open fun getEquipment(): List<Item>
Gets the player's equipped items.
Link copied to clipboard
Gets the item equipped in the specific slot.
Link copied to clipboard
Gets the current percent of the health bar that is green
Link copied to clipboard
Gets the hitsplats currently displayed on this character
Link copied to clipboard
open 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
open fun getLegacyRSPlayer(): RSPlayer
Link copied to clipboard
open fun getModel(): Optional<Model>
Gets the entity model
Link copied to clipboard
open fun getName(): String
Determines the name of the entity of the object this method is called on.
Link copied to clipboard
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
Gets the overhead icon on this player, such as protect from melee
Link copied to clipboard
Gets the message displayed above this character, such as a public chat message
Link copied to clipboard
Gets the skull icon above this player
Link copied to clipboard
open fun getSpotAnimation(): Int
Gets the ID representing the current spot animation of the player, or -1 if the player is not performing a spot animation.
Link copied to clipboard
open 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
open fun hashCode(): Int
Link copied to clipboard
open fun hasHintArrow(): Boolean
Determines if a hint arrow is pointing to this character.
Link copied to clipboard
open fun hover(action: String): Boolean
Hovers the specified action on this entity.
open fun hover(): Boolean
Moves the mouse to a human-randomized point on the 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
open fun isFacing(position: Positionable): Boolean
Determines if this character is facing a given position.
Link copied to clipboard
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
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
Determines if an object is being interacted with by the player
Link copied to clipboard
open fun isMoving(): Boolean
Determines if the character is moving or not.
Link copied to clipboard
open fun isVisible(): Boolean
Determines if the entity is on the screen and able to be clicked.
Link copied to clipboard
Gets the stats of this player by checking the highscores.
Link copied to clipboard
open fun toString(): String