Package de.murmelmeister.murmelapi.user
Schnittstelle User
- Alle bekannten Implementierungsklassen:
UserProvider
User interface to manage users.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidcreateNewUser(UUID uuid, String name) Create a new user and check if the user already exists.voiddeleteUser(UUID uuid) Delete a user.booleanexistsUser(String name) Check if a user exists.booleanexistsUser(UUID uuid) Check if a user exists.intGet the ID of the user.intGet the ID of the user.getUniqueId(String name) Get the UUID of the user.Get a list of all unique IDs.getUsername(UUID uuid) Get the name of the user.Get a list of all usernames.voidJoin a user to the server.voidRename a user.
-
Methodendetails
-
existsUser
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
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
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 username- Name of the user- Löst aus:
SQLException- If the SQL query is not valid
-
deleteUser
Delete a user.- Parameter:
uuid- UUID of the user- Löst aus:
SQLException- If the SQL query is not valid
-
getId
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
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
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
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
Rename a user.- Parameter:
uuid- UUID of the usernewName- New name of the user- Löst aus:
SQLException- If the SQL query is not valid
-
getUniqueIds
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
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
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 username- Name of the user- Löst aus:
SQLException- If the SQL query is not valid
-