public <T> @NonNull T formatCaption(
            final @NonNull CaptionFormatter<C, T> formatter,
            final @NonNull Caption caption,
            final @NonNull List<@NonNull CaptionVariable> variables
    ) {
        return formatter.formatCaption(
                caption,
                this.commandSender,
                this.captionRegistry.caption(caption, this.commandSender),
                variables
        );
    }
Formats a {@code caption} using the given {@code formatter}.

@param <T>       the message type produced by the formatter
@param formatter the formatter
@param caption   the caption key
@param variables the variables to use during formatting
@return the formatted caption
cloud-core/src/main/java/org/incendo/cloud/context/CommandContext.java