make SuggestionProvider use CompletableFuture

This commit is contained in:
kento2 2026-05-30 23:21:29 +02:00
parent 35709b702d
commit c2aec2842a
5 changed files with 11 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import de.kentoj.kencommandapi.BukkitCommandContext;
import de.kentoj.kencommandapi.api.processing.CommandException;
import de.kentoj.kencommandapi.api.structure.argument.ArgumentType;
import de.kentoj.kencommandapi.api.structure.argument.SuggestionProvider;
import de.kentoj.kencommandapi.api.structure.argument.suggestion.NoSuggestionProvider;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
@ -37,6 +38,6 @@ public class OfflinePlayerArgumentType implements ArgumentType<CommandSender, Bu
@Override
public SuggestionProvider<CommandSender, BukkitCommandContext> defaultSuggestionProvider() {
return context -> Set.of();
return new NoSuggestionProvider<>();
}
}

View file

@ -4,6 +4,7 @@ import de.kentoj.kencommandapi.BukkitCommandContext;
import de.kentoj.kencommandapi.api.processing.CommandException;
import de.kentoj.kencommandapi.api.structure.argument.ArgumentType;
import de.kentoj.kencommandapi.api.structure.argument.SuggestionProvider;
import de.kentoj.kencommandapi.api.structure.argument.suggestion.NoSuggestionProvider;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
@ -28,6 +29,6 @@ public class PlayerArgumentType implements ArgumentType<CommandSender, BukkitCom
@Override
public SuggestionProvider<CommandSender, BukkitCommandContext> defaultSuggestionProvider() {
return context -> Set.of();
return new NoSuggestionProvider<>();
}
}