Package rs.kreme.ksbot.api.wrappers
Class KSPlayer
- java.lang.Object
-
- rs.kreme.ksbot.api.wrappers.KSPlayer
-
- All Implemented Interfaces:
Interactable,Locatable,Positionable
public class KSPlayer extends java.lang.Object implements Locatable, Interactable
-
-
Constructor Summary
Constructors Constructor Description KSPlayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetActionIndex(java.lang.String action)Gets the index of a specific action in the player's available actions.java.lang.String[]getActions()Gets the available action options for interacting with the player.intgetAnimation()intgetCombatLevel()Gets the combat level of the player.net.runelite.api.PlayerCompositiongetComp()Gets the player's composition (e.g., appearance details).intgetGraphics()intgetId()Gets the unique ID of the player.net.runelite.api.ActorgetInteracting()Gets the actor that the player is currently interacting with, if any.net.runelite.api.coords.LocalPointgetLocalPoint()Deprecated.java.lang.StringgetName()Gets the name of the player.net.runelite.api.coords.WorldPointgetWorldLocation()Gets the current world location of the player.booleanhasAction(java.lang.String action)Checks if the player has a specific action available.booleaninMotion()voidinteract(int action)Interacts with the player using a specific action index.voidinteract(int index, net.runelite.api.MenuAction menuAction)voidinteract(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)booleaninteract(java.lang.String option)Interacts with the player using a specified action option by name.voidinteract(net.runelite.api.MenuAction menuAction)Interacts with the player using the specified `MenuAction`.booleanisAnimating()booleanisDead()Checks if the player is dead.booleanisDonator()booleanisIdle()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface rs.kreme.ksbot.api.interfaces.Interactable
getClickBounds, getOptionIndex
-
Methods inherited from interface rs.kreme.ksbot.api.interfaces.Locatable
distanceTo, distanceTo, getLocalLocation, getPlane, getWorldX, getWorldY
-
-
-
-
Method Detail
-
getId
public int getId()
Gets the unique ID of the player.- Returns:
- the player's ID as an integer
-
getName
public java.lang.String getName()
Gets the name of the player.- Returns:
- the player's name as a string
-
getWorldLocation
public net.runelite.api.coords.WorldPoint getWorldLocation()
Gets the current world location of the player.- Specified by:
getWorldLocationin interfaceLocatable- Specified by:
getWorldLocationin interfacePositionable- Returns:
- the player's world location as a WorldPoint object
-
getCombatLevel
public int getCombatLevel()
Gets the combat level of the player.- Returns:
- the player's combat level as an integer
-
getInteracting
public net.runelite.api.Actor getInteracting()
Gets the actor that the player is currently interacting with, if any.- Returns:
- the Actor instance the player is interacting with, or null if none
-
isDead
public boolean isDead()
Checks if the player is dead.- Returns:
- true if the player is dead, false otherwise
-
getComp
public net.runelite.api.PlayerComposition getComp()
Gets the player's composition (e.g., appearance details).- Returns:
- the player's PlayerComposition object
-
getActions
public java.lang.String[] getActions()
Gets the available action options for interacting with the player.- Specified by:
getActionsin interfaceInteractable- Returns:
- an array of strings representing the player's available actions
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hasAction
public boolean hasAction(java.lang.String action)
Checks if the player has a specific action available.- Specified by:
hasActionin interfaceInteractable- Parameters:
action- the name of the action to check- Returns:
- true if the action is available, false otherwise
-
getActionIndex
public int getActionIndex(java.lang.String action)
Gets the index of a specific action in the player's available actions.- Parameters:
action- the name of the action to find- Returns:
- the index of the action, or -1 if the action is not found
-
getAnimation
public int getAnimation()
-
isAnimating
public boolean isAnimating()
-
getGraphics
public int getGraphics()
-
isIdle
public boolean isIdle()
-
inMotion
public boolean inMotion()
-
isDonator
public boolean isDonator()
-
interact
public boolean interact(java.lang.String option)
Interacts with the player using a specified action option by name.- Specified by:
interactin interfaceInteractable- Parameters:
option- the name of the action to perform- Returns:
- true if the interaction was successful, false otherwise
-
interact
public void interact(int action)
Interacts with the player using a specific action index.- Specified by:
interactin interfaceInteractable- Parameters:
action- the index of the action (between 0 and 7)
-
interact
public void interact(net.runelite.api.MenuAction menuAction)
Interacts with the player using the specified `MenuAction`.- Specified by:
interactin interfaceInteractable- Parameters:
menuAction- the `MenuAction` enum that specifies which action to perform on the player.
-
interact
public void interact(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)- Specified by:
interactin interfaceInteractable
-
interact
public void interact(int index, net.runelite.api.MenuAction menuAction)- Specified by:
interactin interfaceInteractable
-
getLocalPoint
@Deprecated public net.runelite.api.coords.LocalPoint getLocalPoint()
Deprecated.
-
-