Remove unused method

This commit is contained in:
TheMode 2021-06-16 21:46:13 +02:00
parent 82012c950f
commit fd5f45adcd
2 changed files with 4 additions and 23 deletions

View File

@ -4,8 +4,10 @@ import com.google.common.annotations.Beta;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.arguments.*;
import net.minestom.server.command.builder.arguments.minecraft.SuggestionType;
import net.minestom.server.command.builder.arguments.Argument;
import net.minestom.server.command.builder.arguments.ArgumentLiteral;
import net.minestom.server.command.builder.arguments.ArgumentType;
import net.minestom.server.command.builder.arguments.ArgumentWord;
import net.minestom.server.command.builder.condition.CommandCondition;
import net.minestom.server.utils.StringUtils;
import org.jetbrains.annotations.NotNull;
@ -285,19 +287,6 @@ public class Command {
return syntaxes;
}
/**
* Allows for tab auto completion, this is called everytime the player press a key in the chat
* when in a dynamic argument ({@link ArgumentDynamicWord} (when {@link SuggestionType#ASK_SERVER} is used)
* and {@link ArgumentDynamicStringArray}).
*
* @param sender the command sender
* @param text the whole player's text
* @return the array containing all the suggestion for the current arg (split SPACE), can be null
*/
public @Nullable String[] onDynamicWrite(@NotNull CommandSender sender, @NotNull String text) {
return null;
}
/**
* Called when a {@link CommandSender} executes this command before any syntax callback.
* <p>

View File

@ -10,8 +10,6 @@ import net.minestom.server.command.builder.arguments.ArgumentType;
import net.minestom.server.command.builder.exception.ArgumentSyntaxException;
import net.minestom.server.extensions.Extension;
import net.minestom.server.extensions.ExtensionManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@ -78,10 +76,4 @@ public class ReloadExtensionCommand extends Command {
private void gameModeCallback(CommandSender sender, ArgumentSyntaxException argumentSyntaxException) {
sender.sendMessage(Component.text("'" + argumentSyntaxException.getInput() + "' is not a valid extension name!"));
}
@Nullable
@Override
public String[] onDynamicWrite(@NotNull CommandSender sender, @NotNull String text) {
return extensionsName;
}
}