Package io.github.bakedlibs.dough.common
Class PlayerList
java.lang.Object
io.github.bakedlibs.dough.common.PlayerList
Some utility methods dealing with the
Player list.- Author:
- TheBusyBiscuit
-
Method Summary
Modifier and TypeMethodDescriptionfindByName(String name) This method returns an Optional that describes whether a Player with the given Name is currently online or not.findPermitted(String permission) This method returns a Set of online Players that have the specified Permission.static booleanThis method checks if a Player with the given name is currently online on the server.stream()This method returns a Stream containing all online Players
-
Method Details
-
stream
This method returns a Stream containing all online Players- Returns:
- A Stream of online Players
-
findByName
This method returns an Optional that describes whether a Player with the given Name is currently online or not.- Parameters:
name- The name of the Player- Returns:
- An Optional describing the player (or an empty Optional)
-
findPermitted
This method returns a Set of online Players that have the specified Permission.- Parameters:
permission- The permission the Players should have- Returns:
- A Set of Players
-
isOnline
This method checks if a Player with the given name is currently online on the server.- Parameters:
name- The Name of the Player- Returns:
- Whether the Player is online
-