Class KSPlayer

    • Constructor Summary

      Constructors 
      Constructor Description
      KSPlayer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getActionIndex​(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.
      int getAnimation()  
      int getCombatLevel()
      Gets the combat level of the player.
      net.runelite.api.PlayerComposition getComp()
      Gets the player's composition (e.g., appearance details).
      int getGraphics()  
      int getId()
      Gets the unique ID of the player.
      net.runelite.api.Actor getInteracting()
      Gets the actor that the player is currently interacting with, if any.
      java.lang.String getName()
      Gets the name of the player.
      net.runelite.api.coords.WorldPoint getWorldLocation()
      Gets the current world location of the player.
      boolean hasAction​(java.lang.String action)
      Checks if the player has a specific action available.
      boolean inMotion()  
      void interact​(int action)
      Interacts with the player using a specific action index.
      void interact​(int index, net.runelite.api.MenuAction menuAction)  
      void interact​(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)  
      boolean interact​(java.lang.String option)
      Interacts with the player using a specified action option by name.
      void interact​(net.runelite.api.MenuAction menuAction)
      Interacts with the player using the specified `MenuAction`.
      boolean isAnimating()  
      boolean isDead()
      Checks if the player is dead.
      boolean isDonator()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KSPlayer

        public KSPlayer()
    • 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:
        getWorldLocation in interface Locatable
        Specified by:
        getWorldLocation in interface Positionable
        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:
        getActions in interface Interactable
        Returns:
        an array of strings representing the player's available actions
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hasAction

        public boolean hasAction​(java.lang.String action)
        Checks if the player has a specific action available.
        Specified by:
        hasAction in interface Interactable
        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()
      • 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:
        interact in interface Interactable
        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:
        interact in interface Interactable
        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:
        interact in interface Interactable
        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:
        interact in interface Interactable
      • interact

        public void interact​(int index,
                             net.runelite.api.MenuAction menuAction)
        Specified by:
        interact in interface Interactable