Add Brigadier support.

This commit is contained in:
Alexander Söderberg 2020-09-14 22:36:58 +02:00
parent e1c17a4906
commit 7148e76bcd
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
25 changed files with 822 additions and 61 deletions

View file

@ -24,6 +24,7 @@
package com.intellectualsites.commands;
import com.intellectualsites.commands.components.CommandComponent;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.plugin.Plugin;
@ -56,6 +57,7 @@ final class BukkitCommand extends org.bukkit.command.Command implements PluginId
this.bukkitCommandManager.executeCommand(BukkitCommandSender.of(commandSender), builder.toString())
.whenComplete(((commandResult, throwable) -> {
if (throwable != null) {
commandSender.sendMessage(ChatColor.RED + throwable.getCause().getMessage());
throwable.printStackTrace();
} else {
// Do something...