Interface PlayerRepository
- All Known Implementing Classes:
SQLPlayerRepository
public interface PlayerRepository
Repository interface for managing player data storage and retrieval.
-
Method Summary
Modifier and TypeMethodDescriptiongetTopBalances(int topN) Gets the top N players with the highest balances.@Nullable PlayerDataLoads the player data from the storage system.@Nullable PlayerDataLoads the player data from the storage system.voidsave(PlayerData playerData) Saves the player data to the storage system.
-
Method Details
-
save
Saves the player data to the storage system.- Parameters:
playerData- The player data to save.
-
load
Loads the player data from the storage system.- Parameters:
uuid- The UUID of the player to load.- Returns:
- The player data of the player.
-
load
Loads the player data from the storage system.- Parameters:
uuid- The UUID of the player to load.- Returns:
- The player data of the player.
-
getTopBalances
Gets the top N players with the highest balances.- Parameters:
topN- The number of top players to retrieve.- Returns:
- A map of player UUIDs and their balances, sorted by balance in descending order.
-