Interface PlayerDB

All Superinterfaces:
org.bukkit.event.Listener
All Known Implementing Classes:
BukkitPlayerDB, FilePlayerDB, MemoryPlayerDB

public interface PlayerDB extends org.bukkit.event.Listener
Simple abstraction, allowing for future DB support
  • Field Details

    • UNKNOWN_PLAYER_UUID

      static final UUID UNKNOWN_PLAYER_UUID
    • UNKNOWN_PLAYER_NAME

      static final String UNKNOWN_PLAYER_NAME
      See Also:
  • Method Details

    • getUUIDFromName

      UUID getUUIDFromName(String name)
      Returns the UUID (if found) for the player we currently thinks has that name
      Parameters:
      name - The name (not displayName) of a player.
      Returns:
    • getUUIDFromName

      UUID getUUIDFromName(String name, boolean lookup)
      Returns the UUID (if found) for the player we currently thinks has that name
      Parameters:
      name - The name (not displayName) of a player.
      lookup - Whether or not to ask Mojang for the UUID.
      Returns:
    • getName

      String getName(UUID uuid)
      Returns the current name from the DB.
      Parameters:
      uuid - The UUID of the player.
      Returns:
      the current name from the DB.
    • getDisplayName

      String getDisplayName(UUID uuid)
      Returns the last known DisplayName of the player.
      Parameters:
      uuid - The UUID of the player.
      Returns:
      the last known DisplayName of the player.
    • getDisplayName

      String getDisplayName(String playerName)
      Returns the last known UUID of the player with the given name.
      Parameters:
      playerName - The last known playername.
      Returns:
      Either the displayName (if found) or the player-name.
    • getNames

      Set<String> getNames(String search)
    • updatePlayer

      void updatePlayer(UUID uuid, String name, String displayName)
      Stores a new name in the DB.
    • getPlayer

      org.bukkit.entity.Player getPlayer(UUID uuid)
    • getPlayer

      org.bukkit.entity.Player getPlayer(String name)
    • getOfflinePlayer

      org.bukkit.OfflinePlayer getOfflinePlayer(UUID uuid)
    • shutdown

      void shutdown()