public static <T> @NotNull List<T> addOne(final @NotNull List<T> oldList, final T newElement) {
    if (oldList.isEmpty()) return Collections.singletonList(newElement);
    final List<T> newList = new ArrayList<>(oldList.size() + 1);
    newList.addAll(oldList);
    newList.add(newElement);
    return Collections.unmodifiableList(newList);
  }
Adds an element to the end of the list, or returns a new list.

<p>The returned list is unmodifiable.</p>

@param oldList the old list
@param newElement the element to add
@param <T> the element type
@return a list
@since 4.8.0
api/src/main/java/net/kyori/adventure/util/MonkeyBars.java