| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(GameProfile profile)
Deletes the data associated with a
User. |
boolean |
delete(User user)
Deletes the data associated with a
User. |
Optional<User> |
get(GameProfile profile)
Gets the data of a
User by their GameProfile. |
Optional<User> |
get(String lastKnownName)
Gets the data of a
User by their last known user name
(case-insensitive). |
Optional<User> |
get(UUID uniqueId)
Gets the data of a
User by their unique id. |
Collection<GameProfile> |
getAll()
Gets the collection of all
GameProfiles with stored User
data. |
User |
getOrCreate(GameProfile profile)
Gets or creates a persistent
User associated with the given
GameProfile. |
Collection<GameProfile> |
match(String lastKnownName)
Returns a collection of matching
GameProfiles with stored
User data whose last known user names start with the given string
(case-insensitive). |
Optional<User> get(UUID uniqueId)
User by their unique id.uniqueId - The UUID of the userUser or Optional.empty() if not foundOptional<User> get(String lastKnownName)
User by their last known user name
(case-insensitive).
To get the current name of a player, use the
GameProfileManager service.
lastKnownName - The user nameUser or Optional.empty() if not foundOptional<User> get(GameProfile profile)
User by their GameProfile.profile - The profileUser or Optional.empty() if not foundUser getOrCreate(GameProfile profile)
User associated with the given
GameProfile.
To obtain a GameProfile, use the GameProfileManager.
profile - The profileCollection<GameProfile> getAll()
GameProfiles with stored User
data.
Note that this method is resource-intensive depending on the amount of stored data.
Use get(GameProfile) to get the User data
corresponding to a GameProfile.
Collection of GameProfilesboolean delete(GameProfile profile)
User.
This may not work if the user is logged in.
profile - The profile of the user to deleteboolean delete(User user)
User.
This may not work if the user is logged in.
user - The user to deleteCollection<GameProfile> match(String lastKnownName)
GameProfiles with stored
User data whose last known user names start with the given string
(case-insensitive).
Use get(GameProfile) to get the User data
corresponding to a GameProfile.
lastKnownName - The user name