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 validRSPlayer
s.RSPlayer[]
Returns an array of all validRSPlayer
s.Returns anRSPlayer
object representing the current player.getNearest
(int level) Returns theRSPlayer
that is nearest, out of all of the Players with the provided combat level.getNearest
(String name) Returns theRSPlayer
that is nearest, out of all of the Players with the provided name.getNearest
(Filter<RSPlayer> filter) Returns theRSPlayer
that 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 anRSPlayer
object representing the current player.- Returns:
- An
RSPlayer
object representing the player.
-
getAll
Returns an array of all validRSPlayer
s.- Returns:
- All valid RSPlayers.
-
getAll
Returns an array of all validRSPlayer
s.- Parameters:
filter
- Filters out unwanted matches.- Returns:
- All valid RSPlayers.
-
getNearest
Returns theRSPlayer
that is nearest, out of all of the Players accepted by the provided filter.- Parameters:
filter
- Filters unwanted matches.- Returns:
- An
RSPlayer
object 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 theRSPlayer
that is nearest, out of all of the Players with the provided name.- Parameters:
name
- The name of theRSPlayer
that you are searching for.- Returns:
- An
RSPlayer
object representing the nearest player with the provided name; or null if there are no matching players in the current region.
-
getNearest
Returns theRSPlayer
that is nearest, out of all of the Players with the provided combat level.- Parameters:
level
- The combat level of theRSPlayer
that you are searching for.- Returns:
- An
RSPlayer
object representing the nearest player with the provided combat level; or null if there are no matching players in the current region.
-