Character

public interface Character implements Modellable, Named, Interactable, Indexable, Orientable

Represents a player or npc entity

Types

WalkingDirection
Link copied to clipboard
public enum WalkingDirection

Functions

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