Class PlayersHook
java.lang.Object
privbot.hooks.PlayersHook
- All Implemented Interfaces:
PlayerSearch.Source
Thin wrapper so
PrivContext exposes players via injected Client.-
Method Summary
Modifier and TypeMethodDescriptionThe current Bounty Hunter target's display name (tags and colour codes removed), ornullwhen none is assigned or the server offers no readable source.booleanTrue when this server/profile exposes the Bounty Hunter target at all.static StringcleanBountyTarget(String raw) Normalised target name; blank, "null" and "None" (the overlay's empty spellings) are no target.Closest other player matching any of the supplied names, ornull.net.runelite.api.PlayerclosestPriv(Predicate<net.runelite.api.Player> pred) Nearest matching player as aPrivPlayerfor menu dispatch.booleanWhether another player matching any of the supplied names is currently loaded.List<net.runelite.api.Player> Returns the raw player list.booleanInteracts with the closest other player matchingnameusingaction.Alias ofclosest(String...).static net.runelite.api.PlayerNearest player matching the predicate.static StringnormalizeRsName(String raw) Strips colour/icon tags and normalises spaces (including the non-breaking space RS names use).wrap(net.runelite.api.Player player)
-
Method Details
-
getPlayers
Returns the raw player list. Preferquery()for filtering; this exists so plugins can replace directclient.getPlayers()calls without rewriting iteration logic. -
closest
- Parameters:
pred- the test- Returns:
- the closest loaded player that matches, or null
-
closest
Closest other player matching any of the supplied names, ornull. Matches names case-insensitively (contains) and excludes the local player. Empty or null names still exclude local and return the nearest other player. -
nearest
Alias ofclosest(String...). -
exists
Whether another player matching any of the supplied names is currently loaded. -
interact
-
closestPriv
Nearest matching player as aPrivPlayerfor menu dispatch. -
wrap
- Parameters:
player- a player object (may be null)- Returns:
- the wrapper with this context's adapter, or null
-
nearest
Nearest player matching the predicate. -
bountyTarget
The current Bounty Hunter target's display name (tags and colour codes removed), ornullwhen none is assigned or the server offers no readable source. CheckbountyTargetReadable()before treatingnullas "no target". -
bountyTargetReadable
public boolean bountyTargetReadable()True when this server/profile exposes the Bounty Hunter target at all. -
cleanBountyTarget
-
normalizeRsName
-