Klasse UserProvider

java.lang.Object
de.murmelmeister.murmelapi.user.UserProvider
Alle implementierten Schnittstellen:
User

public final class UserProvider extends Object implements User
  • Konstruktordetails

  • Methodendetails

    • existsUser

      public boolean existsUser(UUID uuid) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Check if a user exists.
      Angegeben von:
      existsUser in Schnittstelle User
      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

      public boolean existsUser(String name) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Check if a user exists.
      Angegeben von:
      existsUser in Schnittstelle User
      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

      public void createNewUser(UUID uuid, String name) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      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.
      Angegeben von:
      createNewUser in Schnittstelle User
      Parameter:
      uuid - UUID of the user
      name - Name of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • deleteUser

      public void deleteUser(UUID uuid) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Delete a user.
      Angegeben von:
      deleteUser in Schnittstelle User
      Parameter:
      uuid - UUID of the user
      Löst aus:
      SQLException - If the SQL query is not valid
    • getId

      public int getId(UUID uuid) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Get the ID of the user.
      Angegeben von:
      getId in Schnittstelle 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

      public int getId(String name) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Get the ID of the user.
      Angegeben von:
      getId in Schnittstelle 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

      public UUID getUniqueId(String name) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Get the UUID of the user.
      Angegeben von:
      getUniqueId in Schnittstelle 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

      public String getUsername(UUID uuid) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Get the name of the user.
      Angegeben von:
      getUsername in Schnittstelle 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

      public void rename(UUID uuid, String newName) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      Rename a user.
      Angegeben von:
      rename in Schnittstelle 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

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

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

      public void joinUser(UUID uuid, String name) throws SQLException
      Beschreibung aus Schnittstelle kopiert: User
      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.
      Angegeben von:
      joinUser in Schnittstelle User
      Parameter:
      uuid - UUID of the user
      name - Name of the user
      Löst aus:
      SQLException - If the SQL query is not valid