Package com.welcome234.pluginsystem
Class Players
java.lang.Object
com.welcome234.pluginsystem.Players
This class is used for managing players
-
Method Summary
Modifier and TypeMethodDescriptionGets all players that have ever joined the serverstatic intGets the maximum number of players that can join the serverGets all players that are currently onlinestatic PlayerGets a player with the player name specifiedstatic intGets the number of players that are currently onlinestatic intGets the number of unique players that have joined the server
-
Method Details
-
getAllPlayers
Gets all players that have ever joined the server- Returns:
- Array list of players
-
getOnlinePlayers
Gets all players that are currently online- Returns:
- Array list of players
-
getUniqueCount
public static int getUniqueCount()Gets the number of unique players that have joined the server- Returns:
- Unique player count
-
getPlayerCount
public static int getPlayerCount()Gets the number of players that are currently online- Returns:
- Players online count
-
getMaximumPlayerCount
public static int getMaximumPlayerCount()Gets the maximum number of players that can join the server- Returns:
- Maximum player count
-
getPlayer
Gets a player with the player name specified- Parameters:
username- Player name- Returns:
- Player instance
- Throws:
IllegalArgumentException- if username is null
-