Class SQLPlayerData

java.lang.Object
dev.plex.storage.player.SQLPlayerData

public class SQLPlayerData extends Object
SQL fetching utilities for players
  • Field Details

  • Constructor Details

    • SQLPlayerData

      public SQLPlayerData()
  • Method Details

    • exists

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

      public boolean exists(String username)
    • getByUUID

      public PlexPlayer getByUUID(UUID uuid, boolean loadExtraData)
      Gets the player from cache or from the SQL database
      Parameters:
      uuid - The unique ID of the player
      Returns:
      a PlexPlayer object
      See Also:
    • getByUUID

      public PlexPlayer getByUUID(UUID uuid)
    • getByName

      public PlexPlayer getByName(String username, boolean loadExtraData)
    • getByName

      public PlexPlayer getByName(String username)
    • getByIP

      public PlexPlayer getByIP(String ip)
      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

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

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