Added deprecation tag

This commit is contained in:
themode 2021-03-11 03:19:07 +01:00
parent 1f7558c753
commit 855c52dea5
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package net.minestom.server.command.builder.arguments;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.NodeMaker;
import net.minestom.server.command.builder.exception.ArgumentSyntaxException;
import net.minestom.server.command.builder.suggestion.SuggestionCallback;
import net.minestom.server.network.packet.server.play.DeclareCommandsPacket;
import net.minestom.server.utils.callback.validator.StringArrayValidator;
import org.apache.commons.lang3.StringUtils;
@ -12,6 +13,8 @@ import org.jetbrains.annotations.Nullable;
/**
* Same as {@link ArgumentStringArray} with the exception
* that this argument can trigger {@link net.minestom.server.command.builder.Command#onDynamicWrite(CommandSender, String)}.
*
* @deprecated Use {@link Argument#setSuggestionCallback(SuggestionCallback)} with any argument type you want
*/
@Deprecated
public class ArgumentDynamicStringArray extends Argument<String[]> {

View File

@ -4,6 +4,7 @@ import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.NodeMaker;
import net.minestom.server.command.builder.arguments.minecraft.SuggestionType;
import net.minestom.server.command.builder.exception.ArgumentSyntaxException;
import net.minestom.server.command.builder.suggestion.SuggestionCallback;
import net.minestom.server.network.packet.server.play.DeclareCommandsPacket;
import net.minestom.server.utils.callback.validator.StringValidator;
import org.apache.commons.lang3.StringUtils;
@ -14,6 +15,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(CommandSender, String)}
* when the suggestion type is {@link SuggestionType#ASK_SERVER}, or any other suggestions available in the enum.
*
* @deprecated Use {@link Argument#setSuggestionCallback(SuggestionCallback)} with any argument type you want
*/
@Deprecated
public class ArgumentDynamicWord extends Argument<String> {