Package rsb.methods
Class Players
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Players
Player related operations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA filter that accepts all matches.Fields inherited from class rsb.methods.MethodProvider
methods -
Method Summary
Modifier and TypeMethodDescriptionRSPlayer[]getAll()Returns an array of all validRSPlayers.RSPlayer[]Returns an array of all validRSPlayers.Returns anRSPlayerobject representing the current player.getNearest(int level) Returns theRSPlayerthat is nearest, out of all of the Players with the provided combat level.getNearest(String name) Returns theRSPlayerthat is nearest, out of all of the Players with the provided name.getNearest(Filter<RSPlayer> filter) Returns theRSPlayerthat is nearest, out of all of the Players accepted by the provided filter.
-
Field Details
-
ALL_FILTER
A filter that accepts all matches.
-
-
Method Details
-
getMyPlayer
Returns anRSPlayerobject representing the current player.- Returns:
- An
RSPlayerobject representing the player.
-
getAll
Returns an array of all validRSPlayers.- Returns:
- All valid RSPlayers.
-
getAll
Returns an array of all validRSPlayers.- Parameters:
filter- Filters out unwanted matches.- Returns:
- All valid RSPlayers.
-
getNearest
Returns theRSPlayerthat is nearest, out of all of the Players accepted by the provided filter.- Parameters:
filter- Filters unwanted matches.- Returns:
- An
RSPlayerobject representing the nearest player that was accepted by the provided Filter; or null if there are no matching players in the current region.
-
getNearest
Returns theRSPlayerthat is nearest, out of all of the Players with the provided name.- Parameters:
name- The name of theRSPlayerthat you are searching for.- Returns:
- An
RSPlayerobject representing the nearest player with the provided name; or null if there are no matching players in the current region.
-
getNearest
Returns theRSPlayerthat is nearest, out of all of the Players with the provided combat level.- Parameters:
level- The combat level of theRSPlayerthat you are searching for.- Returns:
- An
RSPlayerobject representing the nearest player with the provided combat level; or null if there are no matching players in the current region.
-