This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
|
||||
package com.velocitypowered.api.command;
|
||||
|
||||
import com.mojang.brigadier.suggestion.Suggestions;
|
||||
import com.velocitypowered.api.event.command.CommandExecuteEvent;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Predicate;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
@@ -116,6 +118,27 @@ public interface CommandManager {
|
||||
*/
|
||||
CompletableFuture<Boolean> executeImmediatelyAsync(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Asynchronously collects suggestions to fill in the given command {@code cmdLine}.
|
||||
* Returns only the raw completion suggestions without tooltips.
|
||||
*
|
||||
* @param source the source to execute the command for
|
||||
* @param cmdLine the partially completed command
|
||||
* @return a {@link CompletableFuture} eventually completed with a {@link List}, possibly empty
|
||||
*/
|
||||
CompletableFuture<List<String>> offerSuggestions(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Asynchronously collects suggestions to fill in the given command {@code cmdLine}.
|
||||
* Returns the brigadier {@link Suggestions} with tooltips for each result.
|
||||
*
|
||||
* @param source the source to execute the command for
|
||||
* @param cmdLine the partially completed command
|
||||
* @return a {@link CompletableFuture} eventually completed with {@link Suggestions}, possibly
|
||||
* empty
|
||||
*/
|
||||
CompletableFuture<Suggestions> offerBrigadierSuggestions(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Returns an immutable collection of the case-insensitive aliases registered
|
||||
* on this manager.
|
||||
|
||||
@@ -90,7 +90,8 @@ public enum ProtocolVersion implements Ordered<ProtocolVersion> {
|
||||
MINECRAFT_1_21(767, "1.21", "1.21.1"),
|
||||
MINECRAFT_1_21_2(768, "1.21.2", "1.21.3"),
|
||||
MINECRAFT_1_21_4(769, "1.21.4"),
|
||||
MINECRAFT_1_21_5(770, /*1073742067,*/ "1.21.5");
|
||||
MINECRAFT_1_21_5(770, "1.21.5"),
|
||||
MINECRAFT_1_21_6(771, "1.21.6");
|
||||
|
||||
private static final int SNAPSHOT_BIT = 30;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user