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 Type
    Method
    Description
    get(String playerName)
    Get a player by name
    This method will use Bukkit.getOfflinePlayer(String) to get the player
    get(UUID playerUUID)
    Get a player by UUID
    get(org.bukkit.entity.Player player)
    Get a player by Player
    If the player is not yet registered, it will be registered and returned.
    get(org.bukkit.OfflinePlayer offlinePlayer)
    Get a player by OfflinePlayer
    If the player is not yet registered, it will be registered and returned.
     
  • Method Details

    • get

      Optional<TanPlayer> get(String playerName)
      Get a player by name
      This method will use Bukkit.getOfflinePlayer(String) to get the player
      Parameters:
      playerName - the name of the player
      Returns:
      the TanPlayer with the specified name, or Optional.empty() if not found.
    • get

      Optional<TanPlayer> get(UUID playerUUID)
      Get a player by UUID
      Parameters:
      playerUUID - the UUID of the player
      Returns:
      the TanPlayer with the specified UUID, or Optional.empty() if not found.
    • get

      TanPlayer get(org.bukkit.entity.Player player)
      Get a player by Player
      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

      TanPlayer get(org.bukkit.OfflinePlayer offlinePlayer)
      Get a player by OfflinePlayer
      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

      Returns:
      all players registered