component->argument

This commit is contained in:
Alexander Söderberg 2020-09-17 13:19:31 +02:00
parent b3d75496b5
commit 8b0a650b48
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
52 changed files with 1032 additions and 1024 deletions

View file

@ -26,7 +26,7 @@ package com.intellectualsites.commands;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent;
import com.intellectualsites.commands.brigadier.CloudBrigadierManager;
import com.intellectualsites.commands.components.CommandComponent;
import com.intellectualsites.commands.arguments.CommandArgument;
import com.intellectualsites.commands.context.CommandContext;
import com.intellectualsites.commands.sender.CommandSender;
import com.mojang.brigadier.arguments.ArgumentType;
@ -112,7 +112,7 @@ class PaperBrigadierListener<C extends CommandSender> implements Listener {
@EventHandler
public void onCommandRegister(@Nonnull final CommandRegisteredEvent<BukkitBrigadierCommandSource> event) {
final CommandTree<C, BukkitCommandMeta> commandTree = this.paperCommandManager.getCommandTree();
final CommandTree.Node<CommandComponent<C, ?>> node = commandTree.getNamedNode(event.getCommandLabel());
final CommandTree.Node<CommandArgument<C, ?>> node = commandTree.getNamedNode(event.getCommandLabel());
if (node == null) {
return;
}