Class SQLPlayerData

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

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

  • Constructor Details Link icon

    • SQLPlayerData Link icon

      public SQLPlayerData()
  • Method Details Link icon

    • exists Link icon

      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 Link icon

      public boolean exists (String username)
    • getByUUID Link icon

      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:
    • getNameByUUID Link icon

      public String getNameByUUID (UUID uuid)
      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 Link icon

      public PlexPlayer getByUUID (UUID uuid)
    • getByName Link icon

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

      public PlexPlayer getByName (String username)
    • getByIP Link icon

      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 Link icon

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

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