mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-09 05:40:47 +02:00
Cleanup handling of unknown/null usernames for users
This commit is contained in:
@@ -93,13 +93,23 @@ public interface Storage {
|
||||
* Loads a user's data from the main storage into the plugins local storage.
|
||||
*
|
||||
* @param uuid the uuid of the user to load
|
||||
* @param username the users username. (if you want to specify <code>null</code> here, just input "null" as a
|
||||
* string.)
|
||||
* @param username the users username, or null if it is not known.
|
||||
* @return if the operation completed successfully
|
||||
* @throws NullPointerException if uuid or username is null
|
||||
* @throws NullPointerException if uuid is null
|
||||
*/
|
||||
CompletableFuture<Boolean> loadUser(UUID uuid, String username);
|
||||
|
||||
/**
|
||||
* Loads a user's data from the main storage into the plugins local storage.
|
||||
*
|
||||
* @param uuid the uuid of the user to load
|
||||
* @return if the operation completed successfully
|
||||
* @throws NullPointerException if uuid is null
|
||||
*/
|
||||
default CompletableFuture<Boolean> loadUser(UUID uuid) {
|
||||
return loadUser(uuid, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves a user object back to storage. You should call this after you make any changes to a user.
|
||||
*
|
||||
|
@@ -43,7 +43,7 @@ public interface User extends PermissionHolder {
|
||||
UUID getUuid();
|
||||
|
||||
/**
|
||||
* Gets the users username
|
||||
* Gets the users username, or null if no username is associated with this user
|
||||
*
|
||||
* @return the Users Username
|
||||
*/
|
||||
|
Reference in New Issue
Block a user