@SafeVarargs
  @SuppressWarnings("varargs")
  public static <E extends Enum<E>> @NotNull Set<E> enumSet(final Class<E> type, final E@NotNull... constants) {
    final Set<E> set = EnumSet.noneOf(type);
    Collections.addAll(set, constants);
    return Collections.unmodifiableSet(set);
  }
Creates a set from an array of enum constants.

@param type the enum type
@param constants the enum constants
@param <E> the enum type
@return the set
@since 4.0.0
api/src/main/java/net/kyori/adventure/util/MonkeyBars.java