1
0
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:
Luck
2017-04-17 19:31:33 +01:00
parent 43450f6cc7
commit 67b5c72520
27 changed files with 126 additions and 79 deletions

View File

@@ -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.
*

View File

@@ -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
*/