Package dev.plex.cache
Class DataUtils
java.lang.Object
dev.plex.cache.DataUtils
Parent cache class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlexPlayer
Gets a player from cache or from the databasestatic PlexPlayer
Gets a player from cache or from the databasestatic boolean
hasPlayedBefore
(UUID uuid) Checks if the player has been on the server beforestatic void
insert
(PlexPlayer plexPlayer) Inserts a player's information in the databasestatic void
update
(PlexPlayer plexPlayer) Updates a player's information in the database
-
Constructor Details
-
DataUtils
public DataUtils()
-
-
Method Details
-
hasPlayedBefore
Checks if the player has been on the server before- Parameters:
uuid
- The unique ID of the player- Returns:
- true if the player is registered in the database
-
getPlayer
Gets a player from cache or from the database- Parameters:
uuid
- The unique ID of the player- Returns:
- a PlexPlayer object
- See Also:
-
getPlayer
Gets a player from cache or from the database- Parameters:
name
- Username of the player- Returns:
- a PlexPlayer object
- See Also:
-
update
Updates a player's information in the database- Parameters:
plexPlayer
- The PlexPlayer to update- See Also:
-
insert
Inserts a player's information in the database- Parameters:
plexPlayer
- The PlexPlayer to insert- See Also:
-