Package dev.plex.storage.player
Class SQLPlayerData
java.lang.Object
dev.plex.storage.player.SQLPlayerData
SQL fetching utilities for players
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Checks if a player exists in the SQL databaseGets the player from cache or from 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
-
exists
-
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:
-
getByName
-
getByIP
Gets the player from cache or from the SQL database- Parameters:
ip
- The IP address 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:
-