@SafeVarargs
  public static <I, O> @NotNull List<O> nonEmptyArrayToList(final @NotNull Function<I, O> mapper, final @NotNull I first, final @NotNull I@NotNull... others) {
    final List<O> ret = new ArrayList<>(others.length + 1);
    ret.add(mapper.apply(first));
    for (final I other : others) {
      ret.add(requireNonNull(mapper.apply(requireNonNull(other, "source[?]")), "mapper(source[?])"));
    }
    return Collections.unmodifiableList(ret);
  }
Create a list based on a first element plus array of additional elements.

<p>All elements must be non-null before and after mapping.</p>

@param mapper a mapper to convert objects
@param first the first element
@param others any other elements
@param <I> the input type
@param <O> the output type
@return an unmodifiable list based on the provided elements
@since 4.15.0
api/src/main/java/net/kyori/adventure/util/MonkeyBars.java