Class Players


  • public class Players
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Players()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double distanceTo​(net.runelite.api.coords.WorldPoint loc)
      Calculates the distance from the local player to a specified WorldPoint.
      KSPlayer getLocal()
      Retrieves the local player as an instance of KSPlayer.
      PlayerQuery query()
      Searches for all players in the game.
      • Methods inherited from class java.lang.Object

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

      • Players

        public Players()
    • Method Detail

      • query

        public PlayerQuery query()
        Searches for all players in the game. Updates the list of players only if a new tick has occurred, to prevent unnecessary updates every time the method is called.
        Returns:
        A PlayerQuery containing all the players.
      • getLocal

        public KSPlayer getLocal()
        Retrieves the local player as an instance of KSPlayer.
        Returns:
        The local player as a KSPlayer object.
      • distanceTo

        public double distanceTo​(net.runelite.api.coords.WorldPoint loc)
        Calculates the distance from the local player to a specified WorldPoint.
        Parameters:
        loc - The WorldPoint to calculate the distance to.
        Returns:
        The distance to the WorldPoint.