Package rs.kreme.ksbot.api.hooks
Class Players
- java.lang.Object
-
- rs.kreme.ksbot.api.hooks.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.
-
-
-
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.
-
-