@Override
    public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) {
        CommandContext<CommandSender> context = new ImmutableCommandContext<>(sender, label, args, command.getAliases());
        try {
            call(context);
        } catch (CommandInterruptException e) {
            e.getAction().accept(context.sender());
        }
        return true;
    }
An abstract implementation of {@link Command} and {@link CommandExecutor}
helper/src/main/java/me/lucko/helper/command/AbstractCommand.java