Package dev.plex.cache
Class SQLPlayerData
java.lang.Object
dev.plex.cache.SQLPlayerData
SQL fetching utilities for players
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if a player exists in the SQL databaseGets the player from cache or from the SQL databasevoid
insert
(PlexPlayer player) Inserts the player's information in the databasevoid
update
(PlexPlayer player) Updates a player's information in the SQL database
-
Field Details
-
SELECT
- See Also:
-
UPDATE
- See Also:
-
INSERT
- See Also:
-
-
Constructor Details
-
SQLPlayerData
public SQLPlayerData()
-
-
Method Details
-
exists
Checks if a player exists in the SQL database- Parameters:
uuid
- The unique ID of the player- Returns:
- true if the player was found in the database
-
getByUUID
Gets the player from cache or from the SQL database- Parameters:
uuid
- The unique ID of the player- Returns:
- a PlexPlayer object
- See Also:
-
update
Updates a player's information in the SQL database- Parameters:
player
- The PlexPlayer object- See Also:
-
insert
Inserts the player's information in the database- Parameters:
player
- The PlexPlayer object- See Also:
-