mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Specify that ASK_SERVER is required for dynamic write callback
This commit is contained in:
parent
0705ab34ed
commit
daa72719a0
@ -5,6 +5,7 @@ import net.minestom.server.command.builder.arguments.Argument;
|
||||
import net.minestom.server.command.builder.arguments.ArgumentDynamicStringArray;
|
||||
import net.minestom.server.command.builder.arguments.ArgumentDynamicWord;
|
||||
import net.minestom.server.command.builder.arguments.ArgumentType;
|
||||
import net.minestom.server.command.builder.arguments.minecraft.SuggestionType;
|
||||
import net.minestom.server.command.builder.condition.CommandCondition;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -187,7 +188,8 @@ public class Command {
|
||||
|
||||
/**
|
||||
* Allows for tab auto completion, this is called everytime the player press a key in the chat
|
||||
* when in a dynamic argument ({@link ArgumentDynamicWord} and {@link ArgumentDynamicStringArray}).
|
||||
* when in a dynamic argument ({@link ArgumentDynamicWord} (when {@link SuggestionType#ASK_SERVER} is used)
|
||||
* and {@link ArgumentDynamicStringArray}).
|
||||
*
|
||||
* @param text the whole player's text
|
||||
* @return the array containing all the suggestion for the current arg (split " "), can be null
|
||||
|
@ -7,7 +7,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Same as {@link ArgumentWord} with the exception
|
||||
* that this argument can trigger {@link net.minestom.server.command.builder.Command#onDynamicWrite(String)}.
|
||||
* that this argument can trigger {@link net.minestom.server.command.builder.Command#onDynamicWrite(String)}
|
||||
* when the suggestion type is {@link SuggestionType#ASK_SERVER}, or any other suggestions available in the enum.
|
||||
*/
|
||||
public class ArgumentDynamicWord extends Argument<String> {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user