From a81c095f83fc0fb76d2b2f8c2f39b44b8e96bef0 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 12 Sep 2026 21:54:32 +0100 Subject: [PATCH] Fix grammar/spelling in API javadocs --- .../java/net/luckperms/api/LuckPerms.java | 2 +- .../net/luckperms/api/LuckPermsProvider.java | 3 +- .../luckperms/api/actionlog/ActionLog.java | 6 +-- .../luckperms/api/actionlog/package-info.java | 2 +- .../api/cacheddata/CachedDataManager.java | 4 +- .../api/cacheddata/CachedMetaData.java | 4 +- .../api/context/ContextCalculator.java | 7 +-- .../api/context/ContextConsumer.java | 1 - .../net/luckperms/api/context/ContextSet.java | 2 +- .../api/context/ContextSetFactory.java | 2 +- .../api/context/DefaultContextKeys.java | 8 ++-- .../api/context/StaticContextCalculator.java | 3 +- .../api/event/EventSubscription.java | 1 - .../api/event/context/ContextUpdateEvent.java | 4 +- .../api/event/group/GroupLoadEvent.java | 2 +- .../luckperms/api/event/log/package-info.java | 2 +- .../api/event/player/PlayerDataSaveEvent.java | 2 +- .../event/player/PlayerLoginProcessEvent.java | 2 +- .../lookup/UniqueIdDetermineTypeEvent.java | 8 ++-- .../player/lookup/UniqueIdLookupEvent.java | 2 +- .../player/lookup/UsernameLookupEvent.java | 2 +- .../api/event/track/TrackLoadEvent.java | 2 +- .../luckperms/api/event/type/ResultEvent.java | 3 +- .../api/event/user/UserFirstLoginEvent.java | 2 +- .../api/event/user/track/UserDemoteEvent.java | 1 - .../event/user/track/UserPromoteEvent.java | 1 - .../api/messaging/MessagingService.java | 4 +- .../luckperms/api/messenger/Messenger.java | 2 +- .../message/type/UserUpdateMessage.java | 2 +- .../DuplicateRemovalFunction.java | 1 - .../luckperms/api/model/PermissionHolder.java | 4 +- .../luckperms/api/model/PlayerSaveResult.java | 10 ++--- .../net/luckperms/api/model/data/NodeMap.java | 2 +- .../net/luckperms/api/model/group/Group.java | 8 ++-- .../luckperms/api/model/user/UserManager.java | 44 +++++++++---------- .../api/node/DummyNodeEqualityPredicate.java | 1 - .../api/node/NodeEqualityPredicate.java | 3 +- .../java/net/luckperms/api/node/NodeType.java | 4 +- .../net/luckperms/api/node/ScopedNode.java | 1 - .../luckperms/api/node/SimpleNodeType.java | 1 - .../node/metadata/SimpleNodeMetadataKey.java | 3 +- .../api/node/types/DisplayNameNode.java | 2 +- .../api/node/types/InheritanceNode.java | 2 +- .../luckperms/api/node/types/MetaNode.java | 2 +- .../api/node/types/PermissionNode.java | 2 +- .../luckperms/api/node/types/PrefixNode.java | 2 +- .../api/node/types/RegexPermissionNode.java | 2 +- .../luckperms/api/node/types/SuffixNode.java | 2 +- .../luckperms/api/node/types/WeightNode.java | 2 +- .../net/luckperms/api/platform/Health.java | 4 +- .../api/platform/PlatformEntity.java | 4 +- .../luckperms/api/platform/PlayerAdapter.java | 2 +- .../api/platform/PluginMetadata.java | 1 - .../java/net/luckperms/api/query/Flag.java | 4 +- .../net/luckperms/api/query/QueryOptions.java | 2 +- .../api/query/QueryOptionsRegistry.java | 2 +- .../luckperms/api/query/SimpleOptionKey.java | 3 +- .../java/net/luckperms/api/track/Track.java | 2 +- .../java/net/luckperms/api/util/Page.java | 1 - .../java/net/luckperms/api/util/Tristate.java | 3 +- 60 files changed, 104 insertions(+), 108 deletions(-) diff --git a/api/src/main/java/net/luckperms/api/LuckPerms.java b/api/src/main/java/net/luckperms/api/LuckPerms.java index f0fe5bc13..fa7cc2aac 100644 --- a/api/src/main/java/net/luckperms/api/LuckPerms.java +++ b/api/src/main/java/net/luckperms/api/LuckPerms.java @@ -89,7 +89,7 @@ public interface LuckPerms { * Gets the {@link UserManager}, responsible for managing * {@link User} instances. * - *

This manager can be used to retrieve instances of {@link User} by uuid + *

This manager can be used to retrieve instances of {@link User} by UUID * or name, or query all loaded users.

* * @return the user manager diff --git a/api/src/main/java/net/luckperms/api/LuckPermsProvider.java b/api/src/main/java/net/luckperms/api/LuckPermsProvider.java index 0c80b0fd4..99eeadf5b 100644 --- a/api/src/main/java/net/luckperms/api/LuckPermsProvider.java +++ b/api/src/main/java/net/luckperms/api/LuckPermsProvider.java @@ -25,6 +25,7 @@ package net.luckperms.api; +import org.jspecify.annotations.Nullable; import static org.jetbrains.annotations.ApiStatus.Internal; @@ -35,7 +36,7 @@ import static org.jetbrains.annotations.ApiStatus.Internal; * instance, however, this provider can be used if this is not viable.

*/ public final class LuckPermsProvider { - private static LuckPerms instance = null; + private static @Nullable LuckPerms instance = null; /** * Gets an instance of the {@link LuckPerms} API, diff --git a/api/src/main/java/net/luckperms/api/actionlog/ActionLog.java b/api/src/main/java/net/luckperms/api/actionlog/ActionLog.java index d96c259d1..6e27a5f1e 100644 --- a/api/src/main/java/net/luckperms/api/actionlog/ActionLog.java +++ b/api/src/main/java/net/luckperms/api/actionlog/ActionLog.java @@ -57,7 +57,7 @@ public interface ActionLog { /** * Gets the entries in the log performed by the given actor. * - * @param actor the uuid of the actor to filter by + * @param actor the UUID of the actor to filter by * @return the content for the given actor */ @Unmodifiable SortedSet getContent(UUID actor); @@ -65,8 +65,8 @@ public interface ActionLog { /** * Gets the log content for a given user * - * @param uniqueId the uuid to filter by - * @return all content in this log where the user = uuid + * @param uniqueId the UUID to filter by + * @return all content in this log where the user = UUID */ @Unmodifiable SortedSet getUserHistory(UUID uniqueId); diff --git a/api/src/main/java/net/luckperms/api/actionlog/package-info.java b/api/src/main/java/net/luckperms/api/actionlog/package-info.java index a67ce8a29..39fa55172 100644 --- a/api/src/main/java/net/luckperms/api/actionlog/package-info.java +++ b/api/src/main/java/net/luckperms/api/actionlog/package-info.java @@ -24,7 +24,7 @@ */ /** - * {@link net.luckperms.api.actionlog.ActionLog} related functionality. + * {@link net.luckperms.api.actionlog.ActionLogger} related functionality. */ @org.jspecify.annotations.NullMarked package net.luckperms.api.actionlog; \ No newline at end of file diff --git a/api/src/main/java/net/luckperms/api/cacheddata/CachedDataManager.java b/api/src/main/java/net/luckperms/api/cacheddata/CachedDataManager.java index e66626718..038f3aa2c 100644 --- a/api/src/main/java/net/luckperms/api/cacheddata/CachedDataManager.java +++ b/api/src/main/java/net/luckperms/api/cacheddata/CachedDataManager.java @@ -78,7 +78,7 @@ public interface CachedDataManager { * *

For {@link User}s, the most appropriate query options will be their * {@link ContextManager#getQueryOptions(User) current active query options} if the - * corresponding player is online, and otherwise, will fallback to + * corresponding player is online, and otherwise, will fall back to * {@link ContextManager#getStaticQueryOptions() the current static query options}.

* *

For {@link Group}s, the most appropriate query options will always be @@ -95,7 +95,7 @@ public interface CachedDataManager { * *

For {@link User}s, the most appropriate query options will be their * {@link ContextManager#getQueryOptions(User) current active query options} if the - * corresponding player is online, and otherwise, will fallback to + * corresponding player is online, and otherwise, will fall back to * {@link ContextManager#getStaticQueryOptions() the current static query options}.

* *

For {@link Group}s, the most appropriate query options will always be diff --git a/api/src/main/java/net/luckperms/api/cacheddata/CachedMetaData.java b/api/src/main/java/net/luckperms/api/cacheddata/CachedMetaData.java index 3a5d5a2db..64922beda 100644 --- a/api/src/main/java/net/luckperms/api/cacheddata/CachedMetaData.java +++ b/api/src/main/java/net/luckperms/api/cacheddata/CachedMetaData.java @@ -117,7 +117,7 @@ public interface CachedMetaData extends CachedData { * *

This method will always return a {@link Result}, but the * {@link Result#result() inner result} {@link String} will be null if - * a the resultant prefix stack contained no elements.

+ * the resultant prefix stack contained no elements.

* * @return a result containing the prefix * @since 5.4 @@ -152,7 +152,7 @@ public interface CachedMetaData extends CachedData { * *

This method will always return a {@link Result}, but the * {@link Result#result() inner result} {@link String} will be null if - * a the resultant suffix stack contained no elements.

+ * the resultant suffix stack contained no elements.

* * @return a result containing the suffix * @since 5.4 diff --git a/api/src/main/java/net/luckperms/api/context/ContextCalculator.java b/api/src/main/java/net/luckperms/api/context/ContextCalculator.java index c389d8966..b982d76b6 100644 --- a/api/src/main/java/net/luckperms/api/context/ContextCalculator.java +++ b/api/src/main/java/net/luckperms/api/context/ContextCalculator.java @@ -25,6 +25,7 @@ package net.luckperms.api.context; +import org.jspecify.annotations.Nullable; import java.util.Objects; import java.util.function.Function; @@ -37,8 +38,8 @@ import java.util.function.Function; *
    *
  • Context lookups should be fast: lookup methods are likely to * be invoked frequently, and should therefore be fast to execute. If - * determining the current contexts involves a particularly time consuming - * lookup (database queries, network requests, etc), then such results + * determining the current contexts involves a particularly time-consuming + * lookup (database queries, network requests, etc.), then such results * should be cached ahead of time.
  • * *
  • Context lookups should be thread-safe: lookups will sometimes @@ -69,7 +70,7 @@ public interface ContextCalculator { * @param the contextual type * @return the resultant calculator */ - static ContextCalculator forSingleContext(String key, Function valueFunction) { + static ContextCalculator forSingleContext(String key, Function valueFunction) { Objects.requireNonNull(key, "key"); Objects.requireNonNull(valueFunction, "valueFunction"); return (target, consumer) -> { diff --git a/api/src/main/java/net/luckperms/api/context/ContextConsumer.java b/api/src/main/java/net/luckperms/api/context/ContextConsumer.java index 4261538ae..4048de8c1 100644 --- a/api/src/main/java/net/luckperms/api/context/ContextConsumer.java +++ b/api/src/main/java/net/luckperms/api/context/ContextConsumer.java @@ -25,7 +25,6 @@ package net.luckperms.api.context; - /** * Functional interface that accepts context key value pairs. */ diff --git a/api/src/main/java/net/luckperms/api/context/ContextSet.java b/api/src/main/java/net/luckperms/api/context/ContextSet.java index d744a80ee..110cbb9c1 100644 --- a/api/src/main/java/net/luckperms/api/context/ContextSet.java +++ b/api/src/main/java/net/luckperms/api/context/ContextSet.java @@ -64,7 +64,7 @@ import java.util.Set; * the '{@code :}' character. (e.g. "{@code worldguard:region}" for WorldGuard * regions)

    * - *

    Contexts can be combined with each other to form so called + *

    Contexts can be combined with each other to form so-called * "context sets" - simply a collection of context pairs.

    * *

    Two default ContextSet implementations are provided. diff --git a/api/src/main/java/net/luckperms/api/context/ContextSetFactory.java b/api/src/main/java/net/luckperms/api/context/ContextSetFactory.java index 79f2b980f..7d64a8345 100644 --- a/api/src/main/java/net/luckperms/api/context/ContextSetFactory.java +++ b/api/src/main/java/net/luckperms/api/context/ContextSetFactory.java @@ -39,7 +39,7 @@ public interface ContextSetFactory { /** * Prefer using {@link ImmutableContextSet#builder()}. * - * @return a immutable context set builder + * @return an immutable context set builder * @see ImmutableContextSet#builder() */ ImmutableContextSet.Builder immutableBuilder(); diff --git a/api/src/main/java/net/luckperms/api/context/DefaultContextKeys.java b/api/src/main/java/net/luckperms/api/context/DefaultContextKeys.java index 174b46c16..8976504e0 100644 --- a/api/src/main/java/net/luckperms/api/context/DefaultContextKeys.java +++ b/api/src/main/java/net/luckperms/api/context/DefaultContextKeys.java @@ -34,17 +34,17 @@ public final class DefaultContextKeys { } /** - * The context key used to denote the name of the subjects server. + * The context key used to denote the name of the subject's server. */ public static final String SERVER_KEY = "server"; /** - * The context key used to denote the name of the subjects world. + * The context key used to denote the name of the subject's world. */ public static final String WORLD_KEY = "world"; /** - * The context key used to denote the dimension type of the subjects world. + * The context key used to denote the dimension type of the subject's world. * *

    Possible values: overworld, the_nether, the_end

    * @@ -53,7 +53,7 @@ public final class DefaultContextKeys { public static final String DIMENSION_TYPE_KEY = "dimension-type"; /** - * The context key used to denote the subjects gamemode. + * The context key used to denote the subject's gamemode. * *

    Possible values: survival, creative, adventure, spectator

    * diff --git a/api/src/main/java/net/luckperms/api/context/StaticContextCalculator.java b/api/src/main/java/net/luckperms/api/context/StaticContextCalculator.java index 9b3be9eec..67fc3641b 100644 --- a/api/src/main/java/net/luckperms/api/context/StaticContextCalculator.java +++ b/api/src/main/java/net/luckperms/api/context/StaticContextCalculator.java @@ -25,6 +25,7 @@ package net.luckperms.api.context; +import org.jspecify.annotations.Nullable; import java.util.Objects; import java.util.function.Supplier; @@ -45,7 +46,7 @@ public interface StaticContextCalculator extends ContextCalculator { * if the value returned is null. * @return the resultant calculator */ - static StaticContextCalculator forSingleContext(String key, Supplier valueFunction) { + static StaticContextCalculator forSingleContext(String key, Supplier<@Nullable String> valueFunction) { Objects.requireNonNull(key, "key"); Objects.requireNonNull(valueFunction, "valueFunction"); return consumer -> { diff --git a/api/src/main/java/net/luckperms/api/event/EventSubscription.java b/api/src/main/java/net/luckperms/api/event/EventSubscription.java index 93efceae4..920a09a12 100644 --- a/api/src/main/java/net/luckperms/api/event/EventSubscription.java +++ b/api/src/main/java/net/luckperms/api/event/EventSubscription.java @@ -25,7 +25,6 @@ package net.luckperms.api.event; - import java.util.function.Consumer; /** diff --git a/api/src/main/java/net/luckperms/api/event/context/ContextUpdateEvent.java b/api/src/main/java/net/luckperms/api/event/context/ContextUpdateEvent.java index edb93dce9..43662ccc0 100644 --- a/api/src/main/java/net/luckperms/api/event/context/ContextUpdateEvent.java +++ b/api/src/main/java/net/luckperms/api/event/context/ContextUpdateEvent.java @@ -60,11 +60,11 @@ public interface ContextUpdateEvent extends LuckPermsEvent { Object getSubject(); /** - * Gets the subject whose contexts were updated, casted to a given type. + * Gets the subject whose contexts were updated, cast to a given type. * * @param subjectClass the type to cast to * @param the subject type - * @return the casted subject + * @return the cast subject */ default Optional getSubject(Class subjectClass) { Object subject = getSubject(); diff --git a/api/src/main/java/net/luckperms/api/event/group/GroupLoadEvent.java b/api/src/main/java/net/luckperms/api/event/group/GroupLoadEvent.java index ba9e51450..7b520f3de 100644 --- a/api/src/main/java/net/luckperms/api/event/group/GroupLoadEvent.java +++ b/api/src/main/java/net/luckperms/api/event/group/GroupLoadEvent.java @@ -32,7 +32,7 @@ import net.luckperms.api.model.group.Group; /** * Called when a group is loaded into memory from the storage. * - * Note that this event is not the same as {@link GroupCreateEvent} + *

    Note that this event is not the same as {@link GroupCreateEvent}.

    */ public interface GroupLoadEvent extends LuckPermsEvent { diff --git a/api/src/main/java/net/luckperms/api/event/log/package-info.java b/api/src/main/java/net/luckperms/api/event/log/package-info.java index 9ad0a5ceb..01f8a6833 100644 --- a/api/src/main/java/net/luckperms/api/event/log/package-info.java +++ b/api/src/main/java/net/luckperms/api/event/log/package-info.java @@ -24,7 +24,7 @@ */ /** - * Events relating to the {@link net.luckperms.api.actionlog.ActionLog}. + * Events relating to the {@link net.luckperms.api.actionlog.ActionLogger}. */ @org.jspecify.annotations.NullMarked package net.luckperms.api.event.log; \ No newline at end of file diff --git a/api/src/main/java/net/luckperms/api/event/player/PlayerDataSaveEvent.java b/api/src/main/java/net/luckperms/api/event/player/PlayerDataSaveEvent.java index fd5a2fef9..ee4cb6524 100644 --- a/api/src/main/java/net/luckperms/api/event/player/PlayerDataSaveEvent.java +++ b/api/src/main/java/net/luckperms/api/event/player/PlayerDataSaveEvent.java @@ -42,7 +42,7 @@ public interface PlayerDataSaveEvent extends LuckPermsEvent { /** * Gets the unique ID that was saved. * - * @return the uuid + * @return the UUID */ @Param(0) UUID getUniqueId(); diff --git a/api/src/main/java/net/luckperms/api/event/player/PlayerLoginProcessEvent.java b/api/src/main/java/net/luckperms/api/event/player/PlayerLoginProcessEvent.java index c57ff5751..65ac25454 100644 --- a/api/src/main/java/net/luckperms/api/event/player/PlayerLoginProcessEvent.java +++ b/api/src/main/java/net/luckperms/api/event/player/PlayerLoginProcessEvent.java @@ -54,7 +54,7 @@ public interface PlayerLoginProcessEvent extends LuckPermsEvent, Result { /** * Gets the UUID of the connection which was processed * - * @return the uuid of the connection which was processed + * @return the UUID of the connection which was processed */ @Param(0) UUID getUniqueId(); diff --git a/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdDetermineTypeEvent.java b/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdDetermineTypeEvent.java index cee366add..ba559360f 100644 --- a/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdDetermineTypeEvent.java +++ b/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdDetermineTypeEvent.java @@ -33,21 +33,21 @@ import java.util.Objects; import java.util.UUID; /** - * Called when the platform needs to determine the type of a player's {@link UUID unique id}. + * Called when the platform needs to determine a player's {@link UUID unique id} type. * * @since 5.3 */ public interface UniqueIdDetermineTypeEvent extends LuckPermsEvent, ResultEvent { /** - * The players UUID has been obtained by authenticating with the Mojang session servers. + * The player's UUID has been obtained by authenticating with the Mojang session servers. * *

    Usually indicated by the UUID being {@link UUID#version() version} 4.

    */ String TYPE_AUTHENTICATED = "authenticated"; /** - * The players UUID has not been obtained through authentication, and instead is likely based + * The player's UUID has not been obtained through authentication, and instead is likely based * on the username they connected with. * *

    Usually indicated by the UUID being {@link UUID#version() version} 3.

    @@ -55,7 +55,7 @@ public interface UniqueIdDetermineTypeEvent extends LuckPermsEvent, ResultEvent< String TYPE_UNAUTHENTICATED = "unauthenticated"; /** - * The players UUID most likely belongs to a NPC (non-player character). + * The player's UUID most likely belongs to a NPC (non-player character). * *

    Usually indicated by the UUID being {@link UUID#version() version} 2.

    * diff --git a/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdLookupEvent.java b/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdLookupEvent.java index 34a5faf81..c670f6d5a 100644 --- a/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdLookupEvent.java +++ b/api/src/main/java/net/luckperms/api/event/player/lookup/UniqueIdLookupEvent.java @@ -37,7 +37,7 @@ import java.util.UUID; * * @since 5.3 */ -public interface UniqueIdLookupEvent extends LuckPermsEvent, ResultEvent { +public interface UniqueIdLookupEvent extends LuckPermsEvent, ResultEvent<@Nullable UUID> { /** * Gets the username being looked up. diff --git a/api/src/main/java/net/luckperms/api/event/player/lookup/UsernameLookupEvent.java b/api/src/main/java/net/luckperms/api/event/player/lookup/UsernameLookupEvent.java index 5e8352df9..30ac238fd 100644 --- a/api/src/main/java/net/luckperms/api/event/player/lookup/UsernameLookupEvent.java +++ b/api/src/main/java/net/luckperms/api/event/player/lookup/UsernameLookupEvent.java @@ -37,7 +37,7 @@ import java.util.UUID; * * @since 5.3 */ -public interface UsernameLookupEvent extends LuckPermsEvent, ResultEvent { +public interface UsernameLookupEvent extends LuckPermsEvent, ResultEvent<@Nullable String> { /** * Gets the {@link UUID unique id} being looked up. diff --git a/api/src/main/java/net/luckperms/api/event/track/TrackLoadEvent.java b/api/src/main/java/net/luckperms/api/event/track/TrackLoadEvent.java index 6b55e17a8..c87a3a57d 100644 --- a/api/src/main/java/net/luckperms/api/event/track/TrackLoadEvent.java +++ b/api/src/main/java/net/luckperms/api/event/track/TrackLoadEvent.java @@ -32,7 +32,7 @@ import net.luckperms.api.track.Track; /** * Called when a track is loaded into memory from the storage. * - * Note that this event is not the same as {@link TrackCreateEvent} + *

    Note that this event is not the same as {@link TrackCreateEvent}.

    */ public interface TrackLoadEvent extends LuckPermsEvent { diff --git a/api/src/main/java/net/luckperms/api/event/type/ResultEvent.java b/api/src/main/java/net/luckperms/api/event/type/ResultEvent.java index 856559fc6..087e81e18 100644 --- a/api/src/main/java/net/luckperms/api/event/type/ResultEvent.java +++ b/api/src/main/java/net/luckperms/api/event/type/ResultEvent.java @@ -26,6 +26,7 @@ package net.luckperms.api.event.type; import net.luckperms.api.event.util.Param; +import org.jspecify.annotations.Nullable; import java.util.concurrent.atomic.AtomicReference; @@ -35,7 +36,7 @@ import java.util.concurrent.atomic.AtomicReference; * @param the type of the result * @since 5.3 */ -public interface ResultEvent { +public interface ResultEvent { /** * Gets an {@link AtomicReference} containing the result. diff --git a/api/src/main/java/net/luckperms/api/event/user/UserFirstLoginEvent.java b/api/src/main/java/net/luckperms/api/event/user/UserFirstLoginEvent.java index 71e95116f..b4570d440 100644 --- a/api/src/main/java/net/luckperms/api/event/user/UserFirstLoginEvent.java +++ b/api/src/main/java/net/luckperms/api/event/user/UserFirstLoginEvent.java @@ -46,7 +46,7 @@ public interface UserFirstLoginEvent extends LuckPermsEvent { /** * Gets the UUID of the user * - * @return the uuid of the user + * @return the UUID of the user */ @Param(0) UUID getUniqueId(); diff --git a/api/src/main/java/net/luckperms/api/event/user/track/UserDemoteEvent.java b/api/src/main/java/net/luckperms/api/event/user/track/UserDemoteEvent.java index 736a79c25..949a19f87 100644 --- a/api/src/main/java/net/luckperms/api/event/user/track/UserDemoteEvent.java +++ b/api/src/main/java/net/luckperms/api/event/user/track/UserDemoteEvent.java @@ -25,7 +25,6 @@ package net.luckperms.api.event.user.track; - /** * Called when a user is demoted down a track. * diff --git a/api/src/main/java/net/luckperms/api/event/user/track/UserPromoteEvent.java b/api/src/main/java/net/luckperms/api/event/user/track/UserPromoteEvent.java index 600285617..26f22ee0c 100644 --- a/api/src/main/java/net/luckperms/api/event/user/track/UserPromoteEvent.java +++ b/api/src/main/java/net/luckperms/api/event/user/track/UserPromoteEvent.java @@ -25,7 +25,6 @@ package net.luckperms.api.event.user.track; - /** * Called when a user is promoted up a track. * diff --git a/api/src/main/java/net/luckperms/api/messaging/MessagingService.java b/api/src/main/java/net/luckperms/api/messaging/MessagingService.java index 58e7ccf3d..690626472 100644 --- a/api/src/main/java/net/luckperms/api/messaging/MessagingService.java +++ b/api/src/main/java/net/luckperms/api/messaging/MessagingService.java @@ -45,7 +45,7 @@ public interface MessagingService { * Uses the messaging service to inform other servers about a general * change. * - *

    The standard response by other servers will be to execute a overall + *

    The standard response by other servers will be to execute an overall * sync of all live data, equivalent to calling * {@link LuckPerms#runUpdateTask()}.

    * @@ -76,7 +76,7 @@ public interface MessagingService { * *

    The intended use case of this functionality is to allow plugins/mods * to send lightweight and permissions-related custom messages - * between instances, piggy-backing on top of the messenger abstraction + * between instances, piggybacking on top of the messenger abstraction * already built into LuckPerms.

    * *

    It is not intended as a full message broker replacement/abstraction. diff --git a/api/src/main/java/net/luckperms/api/messenger/Messenger.java b/api/src/main/java/net/luckperms/api/messenger/Messenger.java index 04d8d4a2f..4720cc3da 100644 --- a/api/src/main/java/net/luckperms/api/messenger/Messenger.java +++ b/api/src/main/java/net/luckperms/api/messenger/Messenger.java @@ -53,7 +53,7 @@ public interface Messenger extends AutoCloseable { void sendOutgoingMessage(OutgoingMessage outgoingMessage); /** - * Performs the necessary action to gracefully shutdown the messenger. + * Performs the necessary action to gracefully shut down the messenger. */ @Override default void close() { diff --git a/api/src/main/java/net/luckperms/api/messenger/message/type/UserUpdateMessage.java b/api/src/main/java/net/luckperms/api/messenger/message/type/UserUpdateMessage.java index 708751db8..e4b2828e3 100644 --- a/api/src/main/java/net/luckperms/api/messenger/message/type/UserUpdateMessage.java +++ b/api/src/main/java/net/luckperms/api/messenger/message/type/UserUpdateMessage.java @@ -30,7 +30,7 @@ import net.luckperms.api.messenger.message.Message; import java.util.UUID; /** - * Represents an "user update" message. + * Represents a "user update" message. * *

    Used to notify other servers of a change to a specific user.

    */ diff --git a/api/src/main/java/net/luckperms/api/metastacking/DuplicateRemovalFunction.java b/api/src/main/java/net/luckperms/api/metastacking/DuplicateRemovalFunction.java index d1e0acf53..f64ca43c7 100644 --- a/api/src/main/java/net/luckperms/api/metastacking/DuplicateRemovalFunction.java +++ b/api/src/main/java/net/luckperms/api/metastacking/DuplicateRemovalFunction.java @@ -25,7 +25,6 @@ package net.luckperms.api.metastacking; - import java.util.HashSet; import java.util.List; import java.util.ListIterator; diff --git a/api/src/main/java/net/luckperms/api/model/PermissionHolder.java b/api/src/main/java/net/luckperms/api/model/PermissionHolder.java index 936c9f68b..87283f8d4 100644 --- a/api/src/main/java/net/luckperms/api/model/PermissionHolder.java +++ b/api/src/main/java/net/luckperms/api/model/PermissionHolder.java @@ -78,7 +78,7 @@ public interface PermissionHolder { *

    The {@link User#getUniqueId()}, {@link User#getUsername()} and {@link Group#getName()} methods * define a "tighter" specification for obtaining object identifiers.

    * - * @return the identifier for this object. Either a uuid string or name. + * @return the identifier for this object. Either a UUID string or name. */ String getName(); @@ -119,7 +119,7 @@ public interface PermissionHolder { * *

    For {@link User}s, the most appropriate query options will be their * {@link ContextManager#getQueryOptions(User) current active query options} if the - * corresponding player is online, and otherwise, will fallback to + * corresponding player is online, and otherwise, will fall back to * {@link ContextManager#getStaticQueryOptions() the current static query options} * if they are offline.

    * diff --git a/api/src/main/java/net/luckperms/api/model/PlayerSaveResult.java b/api/src/main/java/net/luckperms/api/model/PlayerSaveResult.java index c44644cdc..2989c0c6d 100644 --- a/api/src/main/java/net/luckperms/api/model/PlayerSaveResult.java +++ b/api/src/main/java/net/luckperms/api/model/PlayerSaveResult.java @@ -34,7 +34,7 @@ import java.util.Set; import java.util.UUID; /** - * Encapsulates the result of an operation to save uuid data about a player. + * Encapsulates the result of an operation to save UUID data about a player. * *

    The corresponding method can be found at * {@link UserManager#savePlayerData(UUID, String)}.

    @@ -71,12 +71,12 @@ public interface PlayerSaveResult { @Nullable String getPreviousUsername(); /** - * Gets the other uuids involved in the result. + * Gets the other UUIDs involved in the result. * *

    Returns null when the result doesn't {@link #includes(Outcome) include} the * {@link Outcome#OTHER_UNIQUE_IDS_PRESENT_FOR_USERNAME} status.

    * - * @return the other uuids + * @return the other UUIDs * @see Outcome#OTHER_UNIQUE_IDS_PRESENT_FOR_USERNAME */ @Nullable @Unmodifiable Set getOtherUniqueIds(); @@ -87,7 +87,7 @@ public interface PlayerSaveResult { enum Outcome { /** - * There was no existing data saved for either the uuid or username + * There was no existing data saved for either the UUID or username */ CLEAN_INSERT, @@ -104,7 +104,7 @@ public interface PlayerSaveResult { USERNAME_UPDATED, /** - * There was already a record for the username saved, but it was under a different uuid. + * There was already a record for the username saved, but it was under a different UUID. * *

    This is a bit of a cause for concern. It's possible that "player1" has changed * their username to "player2", and "player3" has changed their username to "player1". diff --git a/api/src/main/java/net/luckperms/api/model/data/NodeMap.java b/api/src/main/java/net/luckperms/api/model/data/NodeMap.java index 5dcdb49b9..0f4f76e98 100644 --- a/api/src/main/java/net/luckperms/api/model/data/NodeMap.java +++ b/api/src/main/java/net/luckperms/api/model/data/NodeMap.java @@ -93,7 +93,7 @@ public interface NodeMap { /** * Adds a node. * - * @param node the node to be add + * @param node the node to be added * @return the result of the operation */ DataMutateResult add(Node node); diff --git a/api/src/main/java/net/luckperms/api/model/group/Group.java b/api/src/main/java/net/luckperms/api/model/group/Group.java index 2b6f85bd6..4386712a2 100644 --- a/api/src/main/java/net/luckperms/api/model/group/Group.java +++ b/api/src/main/java/net/luckperms/api/model/group/Group.java @@ -44,11 +44,11 @@ public interface Group extends PermissionHolder { String getName(); /** - * Gets the groups "display name", if it has one that differs from it's actual name. + * Gets the groups "display name", if it has one that differs from its actual name. * *

    The lookup is made using the current servers active context.

    * - *

    Will return null if the groups display name is equal to it's + *

    Will return null if the groups display name is equal to its * {@link #getName() actual name}.

    * * @return the display name @@ -56,9 +56,9 @@ public interface Group extends PermissionHolder { @Nullable String getDisplayName(); /** - * Gets the groups "display name", if it has one that differs from it's actual name. + * Gets the groups "display name", if it has one that differs from its actual name. * - *

    Will return null if the groups display name is equal to it's + *

    Will return null if the groups display name is equal to its * {@link #getName() actual name}.

    * * @param queryOptions the query options to lookup in diff --git a/api/src/main/java/net/luckperms/api/model/user/UserManager.java b/api/src/main/java/net/luckperms/api/model/user/UserManager.java index e192d9696..66817c56b 100644 --- a/api/src/main/java/net/luckperms/api/model/user/UserManager.java +++ b/api/src/main/java/net/luckperms/api/model/user/UserManager.java @@ -45,7 +45,7 @@ import java.util.function.Consumer; * Represents the object responsible for managing {@link User} instances. * *

    Note that User instances are automatically loaded for online players. - * It's likely that offline players will not have an instance pre-loaded.

    + * It's likely that offline players will not have an instance preloaded.

    * *

    All blocking methods return {@link CompletableFuture}s, which will be * populated with the result once the data has been loaded/saved asynchronously. @@ -62,19 +62,19 @@ public interface UserManager { /** * Loads a user from the plugin's storage provider into memory. * - * @param uniqueId 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 + * @throws NullPointerException if the UUID is null */ CompletableFuture loadUser(UUID uniqueId, @Nullable String username); /** * Loads a user from the plugin's storage provider into memory. * - * @param uniqueId the uuid of the user + * @param uniqueId the UUID of the user * @return the resultant user - * @throws NullPointerException if the uuid is null + * @throws NullPointerException if the UUID is null */ default CompletableFuture loadUser(UUID uniqueId) { return loadUser(uniqueId, null); @@ -83,29 +83,29 @@ public interface UserManager { /** * Loads multiple users from the plugin's storage provider into memory. * - * @param uniqueIds the uuids of the users to load + * @param uniqueIds the UUIDs of the users to load * @return a future for an unmodifiable map of loaded users - * @throws NullPointerException if the uuid set is null + * @throws NullPointerException if the UUID set is null * @since 5.6 */ CompletableFuture<@Unmodifiable Map> loadUsers(Set uniqueIds); /** - * Uses the LuckPerms cache to find a uuid for the given username. + * Uses the LuckPerms cache to find a UUID for the given username. * - *

    This lookup is case insensitive.

    + *

    This lookup is case-insensitive.

    * * @param username the username - * @return a uuid, could be null + * @return a UUID, could be null * @throws NullPointerException if either parameters are null * @throws IllegalArgumentException if the username is invalid */ CompletableFuture lookupUniqueId(String username); /** - * Uses the LuckPerms cache to find a username for the given uuid. + * Uses the LuckPerms cache to find a username for the given UUID. * - * @param uniqueId 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 @@ -132,7 +132,7 @@ public interface UserManager { * then {@link #saveUser(User)}, and returns an encapsulation of the whole process as a * {@link CompletableFuture}.

    * - * @param uniqueId the uuid of the user + * @param uniqueId the UUID of the user * @param action the action to apply to the user * @return a future to encapsulate the operation * @since 5.1 @@ -146,7 +146,7 @@ public interface UserManager { } /** - * Saves data about a player to the uuid caching system. + * Saves data about a player to the UUID caching system. * * @param uniqueId the users mojang unique id * @param username the users username @@ -157,7 +157,7 @@ public interface UserManager { CompletableFuture savePlayerData(UUID uniqueId, String username); /** - * Deletes any data about a given player from the uuid caching system. + * Deletes any data about a given player from the UUID caching system. * *

    Note that this method does not affect any saved user/permissions data.

    * @@ -172,7 +172,7 @@ public interface UserManager { * *

    "Unique" meaning the user isn't just a member of the "default" group.

    * - * @return a set of uuids + * @return a set of UUIDs */ CompletableFuture<@Unmodifiable Set> getUniqueUsers(); @@ -200,9 +200,9 @@ public interface UserManager { /** * Gets a loaded user. * - * @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 + * @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(UUID uniqueId); @@ -210,7 +210,7 @@ public interface UserManager { * Gets a loaded user. * * @param username the username of the user to get - * @return a {@link User} object, if one matching the uuid is loaded, or null if not + * @return a {@link User} object, if one matching the UUID is loaded, or null if not * @throws NullPointerException if the name is null */ @Nullable User getUser(String username); @@ -225,9 +225,9 @@ public interface UserManager { /** * Check if a user is loaded in memory * - * @param uniqueId 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 + * @throws NullPointerException if the UUID is null */ boolean isLoaded(UUID uniqueId); diff --git a/api/src/main/java/net/luckperms/api/node/DummyNodeEqualityPredicate.java b/api/src/main/java/net/luckperms/api/node/DummyNodeEqualityPredicate.java index 2837b465d..2e001af6c 100644 --- a/api/src/main/java/net/luckperms/api/node/DummyNodeEqualityPredicate.java +++ b/api/src/main/java/net/luckperms/api/node/DummyNodeEqualityPredicate.java @@ -25,7 +25,6 @@ package net.luckperms.api.node; - /** * Dummy implementation of {@link NodeEqualityPredicate}, used for the given constant * implementations. diff --git a/api/src/main/java/net/luckperms/api/node/NodeEqualityPredicate.java b/api/src/main/java/net/luckperms/api/node/NodeEqualityPredicate.java index 69704d913..724cda979 100644 --- a/api/src/main/java/net/luckperms/api/node/NodeEqualityPredicate.java +++ b/api/src/main/java/net/luckperms/api/node/NodeEqualityPredicate.java @@ -25,7 +25,6 @@ package net.luckperms.api.node; - import java.util.function.Predicate; /** @@ -141,7 +140,7 @@ public interface NodeEqualityPredicate { NodeEqualityPredicate IGNORE_EXPIRY_TIME_AND_VALUE = new DummyNodeEqualityPredicate("IGNORE_EXPIRY_TIME_AND_VALUE"); /** - * All attributes must match, except for {@link Node#getValue() value} and the if the node + * All attributes must match, except for {@link Node#getValue() value} and if the node * {@link Node#hasExpiry() has an expiry}, which are ignored. * *

    Effectively only considers the key and the context.

    diff --git a/api/src/main/java/net/luckperms/api/node/NodeType.java b/api/src/main/java/net/luckperms/api/node/NodeType.java index a007c5294..e3d4be45a 100644 --- a/api/src/main/java/net/luckperms/api/node/NodeType.java +++ b/api/src/main/java/net/luckperms/api/node/NodeType.java @@ -173,7 +173,7 @@ public interface NodeType { * not {@link #matches(Node) match} the type.

    * * @param node the node to cast - * @return the casted node + * @return the cast node * @throws IllegalArgumentException if the node to cast does not match the type */ T cast(Node node); @@ -186,7 +186,7 @@ public interface NodeType { * does not {@link #matches(Node) match} the type.

    * * @param node the node to cast - * @return an optional, possibly containing a casted node + * @return an optional, possibly containing a cast node */ default Optional tryCast(Node node) { Objects.requireNonNull(node, "node"); diff --git a/api/src/main/java/net/luckperms/api/node/ScopedNode.java b/api/src/main/java/net/luckperms/api/node/ScopedNode.java index c80398d2c..2439bce84 100644 --- a/api/src/main/java/net/luckperms/api/node/ScopedNode.java +++ b/api/src/main/java/net/luckperms/api/node/ScopedNode.java @@ -25,7 +25,6 @@ package net.luckperms.api.node; - /** * A {@link Node}, with its own type and the type of its associated builder * defined as a type parameter. diff --git a/api/src/main/java/net/luckperms/api/node/SimpleNodeType.java b/api/src/main/java/net/luckperms/api/node/SimpleNodeType.java index f84246f21..8e620619e 100644 --- a/api/src/main/java/net/luckperms/api/node/SimpleNodeType.java +++ b/api/src/main/java/net/luckperms/api/node/SimpleNodeType.java @@ -25,7 +25,6 @@ package net.luckperms.api.node; - import java.util.Objects; import java.util.function.Function; import java.util.function.Predicate; diff --git a/api/src/main/java/net/luckperms/api/node/metadata/SimpleNodeMetadataKey.java b/api/src/main/java/net/luckperms/api/node/metadata/SimpleNodeMetadataKey.java index 4a904c434..16718ead0 100644 --- a/api/src/main/java/net/luckperms/api/node/metadata/SimpleNodeMetadataKey.java +++ b/api/src/main/java/net/luckperms/api/node/metadata/SimpleNodeMetadataKey.java @@ -25,6 +25,7 @@ package net.luckperms.api.node.metadata; +import org.jspecify.annotations.Nullable; import java.util.Locale; import java.util.Objects; @@ -54,7 +55,7 @@ final class SimpleNodeMetadataKey implements NodeMetadataKey { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SimpleNodeMetadataKey that = (SimpleNodeMetadataKey) o; diff --git a/api/src/main/java/net/luckperms/api/node/types/DisplayNameNode.java b/api/src/main/java/net/luckperms/api/node/types/DisplayNameNode.java index 8d865a8a7..e6912d3d0 100644 --- a/api/src/main/java/net/luckperms/api/node/types/DisplayNameNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/DisplayNameNode.java @@ -32,7 +32,7 @@ import net.luckperms.api.node.NodeType; import net.luckperms.api.node.ScopedNode; /** - * A sub-type of {@link Node} used to mark the display name of the node's holder. + * A subtype of {@link Node} used to mark the display name of the node's holder. */ public interface DisplayNameNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/InheritanceNode.java b/api/src/main/java/net/luckperms/api/node/types/InheritanceNode.java index 856590620..a2a526055 100644 --- a/api/src/main/java/net/luckperms/api/node/types/InheritanceNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/InheritanceNode.java @@ -33,7 +33,7 @@ import net.luckperms.api.node.NodeType; import net.luckperms.api.node.ScopedNode; /** - * A sub-type of {@link Node} used to mark that the holder of the node should inherit + * A subtype of {@link Node} used to mark that the holder of the node should inherit * from another group. */ public interface InheritanceNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/MetaNode.java b/api/src/main/java/net/luckperms/api/node/types/MetaNode.java index a2e974ada..565661edb 100644 --- a/api/src/main/java/net/luckperms/api/node/types/MetaNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/MetaNode.java @@ -32,7 +32,7 @@ import net.luckperms.api.node.NodeType; import net.luckperms.api.node.ScopedNode; /** - * A sub-type of {@link Node} used to store meta assignments. + * A subtype of {@link Node} used to store meta assignments. */ public interface MetaNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/PermissionNode.java b/api/src/main/java/net/luckperms/api/node/types/PermissionNode.java index 9acbd1f55..f75106380 100644 --- a/api/src/main/java/net/luckperms/api/node/types/PermissionNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/PermissionNode.java @@ -34,7 +34,7 @@ import net.luckperms.api.node.ScopedNode; import java.util.OptionalInt; /** - * A sub-type of {@link Node} representing basic permissions. + * A subtype of {@link Node} representing basic permissions. */ public interface PermissionNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/PrefixNode.java b/api/src/main/java/net/luckperms/api/node/types/PrefixNode.java index eb8f41b73..46bb82c12 100644 --- a/api/src/main/java/net/luckperms/api/node/types/PrefixNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/PrefixNode.java @@ -30,7 +30,7 @@ import net.luckperms.api.node.Node; import net.luckperms.api.node.NodeType; /** - * A sub-type of {@link Node} used to store prefix assignments. + * A subtype of {@link Node} used to store prefix assignments. */ public interface PrefixNode extends ChatMetaNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/RegexPermissionNode.java b/api/src/main/java/net/luckperms/api/node/types/RegexPermissionNode.java index b6cfe0405..4a4141fb4 100644 --- a/api/src/main/java/net/luckperms/api/node/types/RegexPermissionNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/RegexPermissionNode.java @@ -35,7 +35,7 @@ import java.util.Optional; import java.util.regex.Pattern; /** - * A sub-type of {@link Node} used to store regex permissions. + * A subtype of {@link Node} used to store regex permissions. */ public interface RegexPermissionNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/SuffixNode.java b/api/src/main/java/net/luckperms/api/node/types/SuffixNode.java index edbf092e0..b107c6a92 100644 --- a/api/src/main/java/net/luckperms/api/node/types/SuffixNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/SuffixNode.java @@ -30,7 +30,7 @@ import net.luckperms.api.node.Node; import net.luckperms.api.node.NodeType; /** - * A sub-type of {@link Node} used to store suffix assignments. + * A subtype of {@link Node} used to store suffix assignments. */ public interface SuffixNode extends ChatMetaNode { diff --git a/api/src/main/java/net/luckperms/api/node/types/WeightNode.java b/api/src/main/java/net/luckperms/api/node/types/WeightNode.java index a40110fe0..e5342a064 100644 --- a/api/src/main/java/net/luckperms/api/node/types/WeightNode.java +++ b/api/src/main/java/net/luckperms/api/node/types/WeightNode.java @@ -32,7 +32,7 @@ import net.luckperms.api.node.NodeType; import net.luckperms.api.node.ScopedNode; /** - * A sub-type of {@link Node} used to mark the weight of the node's holder. + * A subtype of {@link Node} used to mark the weight of the node's holder. */ public interface WeightNode extends ScopedNode { diff --git a/api/src/main/java/net/luckperms/api/platform/Health.java b/api/src/main/java/net/luckperms/api/platform/Health.java index 25ece4bee..e2bdf92d3 100644 --- a/api/src/main/java/net/luckperms/api/platform/Health.java +++ b/api/src/main/java/net/luckperms/api/platform/Health.java @@ -42,9 +42,9 @@ public interface Health { boolean isHealthy(); /** - * Gets extra metadata/details about the healthcheck result. + * Gets extra metadata/details about the health check result. * - * @return details about the healthcheck status + * @return details about the health check status */ Map getDetails(); diff --git a/api/src/main/java/net/luckperms/api/platform/PlatformEntity.java b/api/src/main/java/net/luckperms/api/platform/PlatformEntity.java index eb7891956..428210ba9 100644 --- a/api/src/main/java/net/luckperms/api/platform/PlatformEntity.java +++ b/api/src/main/java/net/luckperms/api/platform/PlatformEntity.java @@ -42,9 +42,9 @@ public interface PlatformEntity { /** * Gets the unique id of the entity, if it has one. * - *

    For players, this returns their uuid assigned by the server.

    + *

    For players, this returns their UUID assigned by the server.

    * - * @return the uuid of the object, if available + * @return the UUID of the object, if available */ @Nullable UUID getUniqueId(); diff --git a/api/src/main/java/net/luckperms/api/platform/PlayerAdapter.java b/api/src/main/java/net/luckperms/api/platform/PlayerAdapter.java index 5d837b77c..2288c1f07 100644 --- a/api/src/main/java/net/luckperms/api/platform/PlayerAdapter.java +++ b/api/src/main/java/net/luckperms/api/platform/PlayerAdapter.java @@ -104,7 +104,7 @@ public interface PlayerAdapter { * using their {@link #getQueryOptions(Object) active query options}. * * @param player the player - * @return the cached meta data for the player + * @return the cached metadata for the player * @see CachedDataManager#getMetaData() */ default CachedMetaData getMetaData(T player) { diff --git a/api/src/main/java/net/luckperms/api/platform/PluginMetadata.java b/api/src/main/java/net/luckperms/api/platform/PluginMetadata.java index dd67b1ff3..6d280948a 100644 --- a/api/src/main/java/net/luckperms/api/platform/PluginMetadata.java +++ b/api/src/main/java/net/luckperms/api/platform/PluginMetadata.java @@ -25,7 +25,6 @@ package net.luckperms.api.platform; - /** * Provides information about the LuckPerms plugin. */ diff --git a/api/src/main/java/net/luckperms/api/query/Flag.java b/api/src/main/java/net/luckperms/api/query/Flag.java index fb4c49d56..7dfb5c719 100644 --- a/api/src/main/java/net/luckperms/api/query/Flag.java +++ b/api/src/main/java/net/luckperms/api/query/Flag.java @@ -28,8 +28,8 @@ package net.luckperms.api.query; /** * The flags which can be set for a query. * - *

    By default (in places like new instances of {@link QueryOptions.Builder} and - * {@link QueryOptions#defaultContextualOptions()}), all {@link Flag}s are set to true.

    + *

    By default, (in places like new instances of {@link QueryOptions.Builder} and + * {@link QueryOptions#defaultContextualOptions()}) all {@link Flag}s are set to true.

    */ public enum Flag { diff --git a/api/src/main/java/net/luckperms/api/query/QueryOptions.java b/api/src/main/java/net/luckperms/api/query/QueryOptions.java index f5708c62e..4582935dd 100644 --- a/api/src/main/java/net/luckperms/api/query/QueryOptions.java +++ b/api/src/main/java/net/luckperms/api/query/QueryOptions.java @@ -92,7 +92,7 @@ public interface QueryOptions { * *

    This instance has the default set of flags.

    * - * @return the default non contextual query options + * @return the default non-contextual query options */ static QueryOptions nonContextual() { return LuckPermsProvider.get().getQueryOptionsRegistry().defaultNonContextualOptions(); diff --git a/api/src/main/java/net/luckperms/api/query/QueryOptionsRegistry.java b/api/src/main/java/net/luckperms/api/query/QueryOptionsRegistry.java index c2380058c..62c1e4eb0 100644 --- a/api/src/main/java/net/luckperms/api/query/QueryOptionsRegistry.java +++ b/api/src/main/java/net/luckperms/api/query/QueryOptionsRegistry.java @@ -52,7 +52,7 @@ public interface QueryOptionsRegistry { * *

    Prefer using the {@link QueryOptions#nonContextual()} accessor.

    * - * @return the default non contextual query options + * @return the default non-contextual query options * @see QueryOptions#nonContextual() */ QueryOptions defaultNonContextualOptions(); diff --git a/api/src/main/java/net/luckperms/api/query/SimpleOptionKey.java b/api/src/main/java/net/luckperms/api/query/SimpleOptionKey.java index 47eba588f..8c9bd4f61 100644 --- a/api/src/main/java/net/luckperms/api/query/SimpleOptionKey.java +++ b/api/src/main/java/net/luckperms/api/query/SimpleOptionKey.java @@ -25,6 +25,7 @@ package net.luckperms.api.query; +import org.jspecify.annotations.Nullable; import java.util.Locale; import java.util.Objects; @@ -56,7 +57,7 @@ final class SimpleOptionKey implements OptionKey { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SimpleOptionKey that = (SimpleOptionKey) o; diff --git a/api/src/main/java/net/luckperms/api/track/Track.java b/api/src/main/java/net/luckperms/api/track/Track.java index 18a75e370..fcfd2454a 100644 --- a/api/src/main/java/net/luckperms/api/track/Track.java +++ b/api/src/main/java/net/luckperms/api/track/Track.java @@ -49,7 +49,7 @@ public interface Track { /** * Gets a list of the groups on this track * - *

    Index 0 is the first/lowest group in (or start of) the track.

    + *

    The group at index 0 is the first/lowest/starting group in the track.

    * *

    The returned collection is immutable, and cannot be modified.

    * diff --git a/api/src/main/java/net/luckperms/api/util/Page.java b/api/src/main/java/net/luckperms/api/util/Page.java index 626f84746..e6274f799 100644 --- a/api/src/main/java/net/luckperms/api/util/Page.java +++ b/api/src/main/java/net/luckperms/api/util/Page.java @@ -25,7 +25,6 @@ package net.luckperms.api.util; - import java.util.List; /** diff --git a/api/src/main/java/net/luckperms/api/util/Tristate.java b/api/src/main/java/net/luckperms/api/util/Tristate.java index 363bfec46..2d3c42da1 100644 --- a/api/src/main/java/net/luckperms/api/util/Tristate.java +++ b/api/src/main/java/net/luckperms/api/util/Tristate.java @@ -25,6 +25,7 @@ package net.luckperms.api.util; +import org.jspecify.annotations.Nullable; /** * Represents three different states of a setting. @@ -74,7 +75,7 @@ public enum Tristate { * @return {@link #UNDEFINED}, {@link #TRUE} or {@link #FALSE}, if the value * is null, true or false, respectively. */ - public static Tristate of(Boolean val) { + public static Tristate of(@Nullable Boolean val) { return val == null ? UNDEFINED : val ? TRUE : FALSE; }