Skip to content

Commit

Permalink
chore: fix annotation ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Jan 21, 2024
1 parent ebc533a commit 7445390
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected DiscordChannelParser(final @NonNull Set<DiscordParserMode> modes) {

@Override
public final @NonNull ArgumentParseResult<T> parse(
@NonNull final CommandContext<@NonNull C> commandContext,
@NonNull final CommandInput commandInput
final @NonNull CommandContext<@NonNull C> commandContext,
final @NonNull CommandInput commandInput
) {
final ArgumentParseResult<T> preProcessed = this.preProcess(commandContext);
if (preProcessed != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected DiscordMemberParser(final @NonNull Set<@NonNull DiscordParserMode> mod

@Override
public final @NonNull ArgumentParseResult<@NonNull T> parse(
@NonNull final CommandContext<@NonNull C> commandContext,
@NonNull final CommandInput commandInput
final @NonNull CommandContext<@NonNull C> commandContext,
final @NonNull CommandInput commandInput
) {
final ArgumentParseResult<T> preProcessed = this.preProcess(commandContext);
if (preProcessed != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected DiscordRoleParser(final @NonNull Set<@NonNull DiscordParserMode> modes

@Override
public final @NonNull ArgumentParseResult<@NonNull T> parse(
@NonNull final CommandContext<@NonNull C> commandContext,
@NonNull final CommandInput commandInput
final @NonNull CommandContext<@NonNull C> commandContext,
final @NonNull CommandInput commandInput
) {
final ArgumentParseResult<T> preProcessed = this.preProcess(commandContext);
if (preProcessed != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ protected DiscordUserParser(

@Override
public final @NonNull ArgumentParseResult<@NonNull T> parse(
@NonNull final CommandContext<@NonNull C> commandContext,
@NonNull final CommandInput commandInput
final @NonNull CommandContext<@NonNull C> commandContext,
final @NonNull CommandInput commandInput
) {
final ArgumentParseResult<T> preProcessed = this.preProcess(commandContext);
if (preProcessed != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public TestCommandManager() {
}

@Override
public boolean hasPermission(@NonNull final TestCommandSender sender, @NonNull final String permission) {
public boolean hasPermission(final @NonNull TestCommandSender sender, final @NonNull String permission) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public RoleParser(final @NonNull Set<DiscordParserMode> modes) {
}

@Override
protected @Nullable ArgumentParseResult<Role> preProcess(@NonNull final CommandContext<C> context) {
protected @Nullable ArgumentParseResult<Role> preProcess(final @NonNull CommandContext<C> context) {
if (!context.contains("MessageReceivedEvent")) {
return ArgumentParseResult.failure(new IllegalStateException(
"MessageReceivedEvent was not in the command context."
Expand All @@ -98,7 +98,7 @@ public RoleParser(final @NonNull Set<DiscordParserMode> modes) {
}

@Override
protected @NonNull DiscordRepository<Guild, Role> repository(@NonNull final CommandContext<C> context) {
protected @NonNull DiscordRepository<Guild, Role> repository(final @NonNull CommandContext<C> context) {
final MessageReceivedEvent event = context.get("MessageReceivedEvent");
return new JDARoleRepository(event.getGuild());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public UserParser(
}

@Override
protected @Nullable ArgumentParseResult<User> preProcess(@NonNull final CommandContext<C> context) {
protected @Nullable ArgumentParseResult<User> preProcess(final @NonNull CommandContext<C> context) {
if (!context.contains("MessageReceivedEvent")) {
return ArgumentParseResult.failure(new IllegalStateException(
"MessageReceivedEvent was not in the command context."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public final class BotPermissionPostProcessor<T> implements CommandPostprocessor<T> {

@Override
public void accept(@NonNull final CommandPostprocessingContext<T> postprocessingContext) {
public void accept(final @NonNull CommandPostprocessingContext<T> postprocessingContext) {
final CommandContext<T> context = postprocessingContext.commandContext();
final CommandMeta meta = postprocessingContext.command().commandMeta();
final MessageReceivedEvent event = context.get("MessageReceivedEvent");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public final class UserPermissionPostProcessor<T> implements CommandPostprocessor<T> {

@Override
public void accept(@NonNull final CommandPostprocessingContext<T> postprocessingContext) {
public void accept(final @NonNull CommandPostprocessingContext<T> postprocessingContext) {
final CommandContext<T> context = postprocessingContext.commandContext();
final CommandMeta meta = postprocessingContext.command().commandMeta();
final MessageReceivedEvent event = context.get("MessageReceivedEvent");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public JDAMemberRepository(final @NonNull Guild guild) {
}

@Override
public @NonNull Collection<? extends @NonNull Member> getByName(@NonNull final String name) {
public @NonNull Collection<? extends @NonNull Member> getByName(final @NonNull String name) {
return this.guild.getMembers()
.stream()
.filter(member -> member.getEffectiveName().toLowerCase().startsWith(name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public JDARoleRepository(final @NonNull Guild guild) {
}

@Override
public @NonNull Collection<? extends @NonNull Role> getByName(@NonNull final String name) {
public @NonNull Collection<? extends @NonNull Role> getByName(final @NonNull String name) {
return this.guild.getRolesByName(name, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public JDAUserRepository(
}

@Override
public @NonNull Collection<? extends @NonNull User> getByName(@NonNull final String name) {
public @NonNull Collection<? extends @NonNull User> getByName(final @NonNull String name) {
if (this.isolation == DiscordUserParser.Isolation.GLOBAL) {
return this.guild.getJDA().getUsersByName(name, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ private JDAParser(final @NonNull Function<@NonNull OptionMapping, @Nullable T> e

@Override
public @NonNull CompletableFuture<@Nullable ArgumentParseResult<T>> parseNullable(
@NonNull final CommandContext<@NonNull C> commandContext,
@NonNull final CommandInput commandInput
final @NonNull CommandContext<@NonNull C> commandContext,
final @NonNull CommandInput commandInput
) {
final JDAInteraction interaction = commandContext.get(JDA5CommandManager.CONTEXT_JDA_INTERACTION);
return interaction.getOptionMapping(commandInput.readString())
Expand Down

0 comments on commit 7445390

Please sign in to comment.