Package dev.plex.cache
Class DataUtils
java.lang.Object
dev.plex.cache.DataUtils
Parent cache class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlexPlayer
static PlexPlayer
static PlexPlayer
Gets a player from cache or from the databasestatic PlexPlayer
static PlexPlayer
getPlayerByIP
(String ip) Gets a player from cache or from the databasestatic boolean
hasPlayedBefore
(String username) static 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
-
hasPlayedBefore
-
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
-
getPlayer
-
getPlayer
-
getPlayerByIP
Gets a player from cache or from the database- Parameters:
ip
- The IP address 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:
-