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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDisplayName
(String playerName) Returns the last known UUID of the player with the given name.getDisplayName
(UUID uuid) Returns the last known DisplayName of the player.Returns the current name from the DB.org.bukkit.OfflinePlayer
getOfflinePlayer
(UUID uuid) org.bukkit.entity.Player
org.bukkit.entity.Player
getUUIDFromName
(String name) Returns the UUID (if found) for the player we currently thinks has that namegetUUIDFromName
(String name, boolean lookup) Returns the UUID (if found) for the player we currently thinks has that namevoid
shutdown()
void
updatePlayer
(UUID uuid, String name, String displayName) Stores a new name in the DB.
-
Field Details
-
UNKNOWN_PLAYER_UUID
-
UNKNOWN_PLAYER_NAME
- See Also:
-
-
Method Details
-
getUUIDFromName
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
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
Returns the current name from the DB.- Parameters:
uuid
- The UUID of the player.- Returns:
- the current name from the DB.
-
getDisplayName
Returns the last known DisplayName of the player.- Parameters:
uuid
- The UUID of the player.- Returns:
- the last known DisplayName of the player.
-
getDisplayName
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
-
updatePlayer
Stores a new name in the DB. -
getPlayer
-
getPlayer
-
getOfflinePlayer
-
shutdown
void shutdown()
-