Schnittstelle User

Alle bekannten Implementierungsklassen:
UserProvider

public sealed interface User permits UserProvider
User interface to manage users.
  • Methodendetails

    • existsUser

      boolean existsUser(UUID uuid) throws SQLException
      Check if a user exists.
      Parameter:
      uuid - UUID of the user
      Gibt zurück:
      True if the user exists, otherwise false
      Löst aus:
      SQLException - If the SQL query is not valid
    • existsUser

      boolean existsUser(String name) throws SQLException
      Check if a user exists.
      Parameter:
      name - Name of the user
      Gibt zurück:
      True if the user exists, otherwise false
      Löst aus:
      SQLException - If the SQL query is not valid
    • createNewUser

      void createNewUser(UUID uuid, String name) throws SQLException
      Create a new user and check if the user already exists. If the user already exists, the method will return without creating a new user.
      Parameter:
      uuid - UUID of the user
      name - Name of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • deleteUser

      void deleteUser(UUID uuid) throws SQLException
      Delete a user.
      Parameter:
      uuid - UUID of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getId

      int getId(UUID uuid) throws SQLException
      Get the ID of the user.
      Parameter:
      uuid - UUID of the user
      Gibt zurück:
      The ID of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getId

      int getId(String name) throws SQLException
      Get the ID of the user.
      Parameter:
      name - Name of the user
      Gibt zurück:
      The ID of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getUniqueId

      UUID getUniqueId(String name) throws SQLException
      Get the UUID of the user.
      Parameter:
      name - Name of the user
      Gibt zurück:
      The UUID of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getUsername

      String getUsername(UUID uuid) throws SQLException
      Get the name of the user.
      Parameter:
      uuid - UUID of the user
      Gibt zurück:
      The name of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • rename

      void rename(UUID uuid, String newName) throws SQLException
      Rename a user.
      Parameter:
      uuid - UUID of the user
      newName - New name of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getUniqueIds

      List<UUID> getUniqueIds() throws SQLException
      Get a list of all unique IDs.
      Gibt zurück:
      A list of all unique IDs
      Löst aus:
      SQLException - If the SQL query is not valid
    • getUsernames

      List<String> getUsernames() throws SQLException
      Get a list of all usernames.
      Gibt zurück:
      A list of all usernames
      Löst aus:
      SQLException - If the SQL query is not valid
    • joinUser

      void joinUser(UUID uuid, String name) throws SQLException
      Join a user to the server. Create a new user if the user does not exist. Check if the user changes their name and rename them.
      Parameter:
      uuid - UUID of the user
      name - Name of the user
      Löst aus:
      SQLException - If the SQL query is not valid