Package org.tan.api.getters
Interface TanPlayerManager
public interface TanPlayerManager
The TanPlayerManager interface provides methods for accessing and managing player-related content within the application.
It allows retrieval of players by their names, UUIDs or Player/OfflinePlayer objects and provides a collection of all registered players.
This interface is essential for handling player-related operations and ensuring proper management of player data.
-
Method Summary
Modifier and TypeMethodDescriptionGet a player by name
This method will useBukkit.getOfflinePlayer(String)
to get the playerGet a player by UUIDget
(org.bukkit.entity.Player player) Get a player byPlayer
If the player is not yet registered, it will be registered and returned.get
(org.bukkit.OfflinePlayer offlinePlayer) Get a player byOfflinePlayer
If the player is not yet registered, it will be registered and returned.getAll()
-
Method Details
-
get
Get a player by name
This method will useBukkit.getOfflinePlayer(String)
to get the player- Parameters:
playerName
- the name of the player- Returns:
- the
TanPlayer
with the specified name, orOptional.empty()
if not found.
-
get
Get a player by UUID- Parameters:
playerUUID
- the UUID of the player- Returns:
- the
TanPlayer
with the specified UUID, orOptional.empty()
if not found.
-
get
Get a player byPlayer
If the player is not yet registered, it will be registered and returned.- Parameters:
player
- the player- Returns:
- the
TanPlayer
with the specified player.
-
get
Get a player byOfflinePlayer
If the player is not yet registered, it will be registered and returned.- Parameters:
offlinePlayer
- the offline player- Returns:
- the
TanPlayer
with the specified offline player.
-
getAll
Collection<TanPlayer> getAll()- Returns:
- all players registered
-