mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-12 21:17:28 +00:00
More work
This commit is contained in:
123 files changed
+680
-1098
No files matched your search
@@ -60,10 +60,10 @@ public interface ActionLog {
|
||||
/**
|
||||
* Gets the log content for a given user
|
||||
*
|
||||
* @param uuid the uuid to filter by
|
||||
* @param uniqueId the uuid to filter by
|
||||
* @return all content in this log where the user = uuid
|
||||
*/
|
||||
@NonNull SortedSet<Action> getUserHistory(@NonNull UUID uuid);
|
||||
@NonNull SortedSet<Action> getUserHistory(@NonNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
* Gets the log content for a given group
|
||||
|
||||
@@ -200,7 +200,7 @@ public interface PermissionHolder {
|
||||
* @return a Tristate for the holders permission status for the node
|
||||
* @throws NullPointerException if the node is null
|
||||
*/
|
||||
@NonNull Tristate hasNode(@NonNull Node node, @NonNull NodeEqualityPredicate equalityPredicate);
|
||||
@NonNull Tristate containsNode(@NonNull Node node, @NonNull NodeEqualityPredicate equalityPredicate);
|
||||
|
||||
/**
|
||||
* Sets a permission node for the permission holder.
|
||||
@@ -462,18 +462,6 @@ public interface PermissionHolder {
|
||||
* <p>This method is called periodically by the platform, so it is only necessary to run
|
||||
* if you want to guarantee that the current data is totally up-to-date.</p>
|
||||
*/
|
||||
void auditTemporaryPermissions();
|
||||
|
||||
/**
|
||||
* Checks to see if the object inherits a certain permission.
|
||||
*
|
||||
* <p>Although this method is named inheritsPermission, it can be used for all node types.</p>
|
||||
*
|
||||
* @param node the node to check for
|
||||
* @param equalityPredicate how to determine if a node matches
|
||||
* @return a Tristate for the holders inheritance status for the node
|
||||
* @throws NullPointerException if the node is null
|
||||
*/
|
||||
@NonNull Tristate inheritsNode(@NonNull Node node, @NonNull NodeEqualityPredicate equalityPredicate);
|
||||
void auditTemporaryNodes();
|
||||
|
||||
}
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
package net.luckperms.api.model.group;
|
||||
|
||||
import net.luckperms.api.context.ContextSet;
|
||||
import net.luckperms.api.model.PermissionHolder;
|
||||
import net.luckperms.api.query.QueryOptions;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
@@ -63,10 +63,10 @@ public interface Group extends PermissionHolder {
|
||||
* <p>Will return <code>null</code> if the groups display name is equal to it's
|
||||
* {@link #getName() actual name}.</p>
|
||||
*
|
||||
* @param contextSet the contexts to lookup in
|
||||
* @param queryOptions the query options to lookup in
|
||||
* @return the display name
|
||||
*/
|
||||
@Nullable String getDisplayName(@NonNull ContextSet contextSet);
|
||||
@Nullable String getDisplayName(@NonNull QueryOptions queryOptions);
|
||||
|
||||
/**
|
||||
* Gets the weight of this group, if present.
|
||||
|
||||
@@ -59,22 +59,22 @@ public interface UserManager {
|
||||
/**
|
||||
* Loads a user from the plugin's storage provider into memory.
|
||||
*
|
||||
* @param uuid the uuid of the user
|
||||
* @param uniqueId the uuid of the user
|
||||
* @param username the username, if known
|
||||
* @return the resultant user
|
||||
* @throws NullPointerException if the uuid is null
|
||||
*/
|
||||
@NonNull CompletableFuture<User> loadUser(@NonNull UUID uuid, @Nullable String username);
|
||||
@NonNull CompletableFuture<User> loadUser(@NonNull UUID uniqueId, @Nullable String username);
|
||||
|
||||
/**
|
||||
* Loads a user from the plugin's storage provider into memory.
|
||||
*
|
||||
* @param uuid the uuid of the user
|
||||
* @param uniqueId the uuid of the user
|
||||
* @return the resultant user
|
||||
* @throws NullPointerException if the uuid is null
|
||||
*/
|
||||
default @NonNull CompletableFuture<User> loadUser(@NonNull UUID uuid) {
|
||||
return loadUser(uuid, null);
|
||||
default @NonNull CompletableFuture<User> loadUser(@NonNull UUID uniqueId) {
|
||||
return loadUser(uniqueId, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,12 +92,12 @@ public interface UserManager {
|
||||
/**
|
||||
* Uses the LuckPerms cache to find a username for the given uuid.
|
||||
*
|
||||
* @param uuid the uuid
|
||||
* @param uniqueId the uuid
|
||||
* @return a username, could be null
|
||||
* @throws NullPointerException if either parameters are null
|
||||
* @throws IllegalArgumentException if the username is invalid
|
||||
*/
|
||||
@NonNull CompletableFuture<String> lookupUsername(@NonNull UUID uuid);
|
||||
@NonNull CompletableFuture<String> lookupUsername(@NonNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
* Saves a user's data back to the plugin's storage provider.
|
||||
@@ -114,13 +114,13 @@ public interface UserManager {
|
||||
/**
|
||||
* Saves data about a player to the uuid caching system.
|
||||
*
|
||||
* @param uuid the users mojang unique id
|
||||
* @param uniqueId the users mojang unique id
|
||||
* @param username the users username
|
||||
* @return the result of the operation.
|
||||
* @throws NullPointerException if either parameters are null
|
||||
* @throws IllegalArgumentException if the username is invalid
|
||||
*/
|
||||
@NonNull CompletableFuture<PlayerSaveResult> savePlayerData(@NonNull UUID uuid, @NonNull String username);
|
||||
@NonNull CompletableFuture<PlayerSaveResult> savePlayerData(@NonNull UUID uniqueId, @NonNull String username);
|
||||
|
||||
/**
|
||||
* Gets a set all "unique" user UUIDs.
|
||||
@@ -143,11 +143,11 @@ public interface UserManager {
|
||||
/**
|
||||
* Gets a loaded user.
|
||||
*
|
||||
* @param uuid the uuid of the user to get
|
||||
* @param uniqueId the uuid of the user to get
|
||||
* @return a {@link User} object, if one matching the uuid is loaded, or null if not
|
||||
* @throws NullPointerException if the uuid is null
|
||||
*/
|
||||
@Nullable User getUser(@NonNull UUID uuid);
|
||||
@Nullable User getUser(@NonNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
* Gets a loaded user.
|
||||
@@ -168,11 +168,11 @@ public interface UserManager {
|
||||
/**
|
||||
* Check if a user is loaded in memory
|
||||
*
|
||||
* @param uuid the uuid to check for
|
||||
* @param uniqueId the uuid to check for
|
||||
* @return true if the user is loaded
|
||||
* @throws NullPointerException if the uuid is null
|
||||
*/
|
||||
boolean isLoaded(@NonNull UUID uuid);
|
||||
boolean isLoaded(@NonNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
* Unload a user from the internal storage, if they're not currently online.
|
||||
|
||||
@@ -87,9 +87,13 @@ public enum DataQueryOrder implements Comparator<DataType> {
|
||||
private static final List<DataType> TRANSIENT_LAST_LIST = Collections.unmodifiableList(Arrays.asList(DataType.NORMAL, DataType.TRANSIENT));
|
||||
|
||||
/**
|
||||
* Gets a {@link List} of all {@link DataType}s, in the order defined by
|
||||
* Gets a {@link List} of all {@link DataType}s, in order of greatest to least, as defined by
|
||||
* the {@code comparator}.
|
||||
*
|
||||
* <p>Equivalent to calling {@link Arrays#sort(Object[], Comparator)} on
|
||||
* {@link DataType#values()}, but with the comparator
|
||||
* {@link Comparator#reversed() reversed}.</p>
|
||||
*
|
||||
* @param comparator the comparator
|
||||
* @return the ordered data types
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user