.
This commit is contained in:
parent
b4c1e242c8
commit
35709b702d
7 changed files with 26 additions and 29 deletions
|
|
@ -7,7 +7,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "de.kentoj"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
|
||||
dependencies {
|
||||
api(project(":kencommandapi-core"))
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import org.bukkit.command.CommandSender;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class BukkitKenCommand extends Command {
|
||||
|
||||
|
|
@ -25,11 +24,6 @@ public class BukkitKenCommand extends Command {
|
|||
this.setPermission(rootNode.getPermission());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] args) {
|
||||
commandManager.invoke(rootNode, sender, args);
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
package de.kentoj.kencommandapi;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BukkitTabCompleter implements TabCompleter {
|
||||
|
||||
@Override
|
||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package de.kentoj.kencommandapi.type;
|
||||
|
||||
import de.kentoj.kencommandapi.BukkitCommandContext;
|
||||
import de.kentoj.kencommandapi.api.processing.CommandContext;
|
||||
import de.kentoj.kencommandapi.api.processing.CommandException;
|
||||
import de.kentoj.kencommandapi.api.structure.argument.ArgumentType;
|
||||
import de.kentoj.kencommandapi.api.structure.argument.SuggestionProvider;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@ public class Main {
|
|||
public void sendErrorMessage(PrintStream printStream, CommandException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(PrintStream printStream, String permission) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
var root = api.createNode("coins");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package de.kentoj.kencommandapi.api.structure.argument.types;
|
||||
|
||||
import de.kentoj.kencommandapi.api.processing.CommandContext;
|
||||
import de.kentoj.kencommandapi.api.structure.argument.ArgumentType;
|
||||
import de.kentoj.kencommandapi.api.structure.argument.SuggestionProvider;
|
||||
import de.kentoj.kencommandapi.api.structure.argument.suggestion.NoSuggestionProvider;
|
||||
import lombok.Getter;
|
||||
|
||||
public class StringArgumentType<T, S extends CommandContext<T, ?>> implements ArgumentType<T, S, String> {
|
||||
|
||||
@Override
|
||||
public String parseInput(String string) {
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuggestionProvider<T, S> defaultSuggestionProvider() {
|
||||
return new NoSuggestionProvider<>();
|
||||
}
|
||||
}
|
||||
|
|
@ -21,8 +21,4 @@ public class TabCompleter<T, S extends CommandContext<T, ?>> {
|
|||
|
||||
return node.getLiterals().stream().map(CommandNode::getNames).flatMap(Arrays::stream).toList();
|
||||
}
|
||||
|
||||
private List<String> getLastNode(CommandNode<T, S> node, String[] args) {
|
||||
if (node.get)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue