From 855c52dea5af0ab93c0f6ed81354535012c343e5 Mon Sep 17 00:00:00 2001 From: themode Date: Thu, 11 Mar 2021 03:19:07 +0100 Subject: [PATCH] Added deprecation tag --- .../command/builder/arguments/ArgumentDynamicStringArray.java | 3 +++ .../server/command/builder/arguments/ArgumentDynamicWord.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicStringArray.java b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicStringArray.java index ae9757c23..c6507e697 100644 --- a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicStringArray.java +++ b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicStringArray.java @@ -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 { diff --git a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicWord.java b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicWord.java index cc5f18788..d91aec803 100644 --- a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicWord.java +++ b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentDynamicWord.java @@ -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 {