Class DataUtils

java.lang.Object
dev.plex.cache.DataUtils

public class DataUtils extends Object
Parent cache class
  • Constructor Details

    • DataUtils

      public DataUtils()
  • Method Details

    • hasPlayedBefore

      public static boolean hasPlayedBefore(UUID uuid)
      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

      public static boolean hasPlayedBefore(String username)
    • getPlayer

      public static PlexPlayer getPlayer(UUID uuid)
      Gets a player from cache or from the database
      Parameters:
      uuid - The unique ID of the player
      Returns:
      a PlexPlayer object
      See Also:
    • getPlayer

      public static PlexPlayer getPlayer(String username)
    • getPlayerByIP

      public static PlexPlayer getPlayerByIP(String ip)
      Gets a player from cache or from the database
      Parameters:
      ip - The IP address of the player.
      Returns:
      a PlexPlayer object
      See Also:
    • update

      public static void update(PlexPlayer plexPlayer)
      Updates a player's information in the database
      Parameters:
      plexPlayer - The PlexPlayer to update
      See Also:
    • insert

      public static void insert(PlexPlayer plexPlayer)
      Inserts a player's information in the database
      Parameters:
      plexPlayer - The PlexPlayer to insert
      See Also: