static @NotNull ListBinaryTag listBinaryTag(final @NotNull BinaryTagType<? extends BinaryTag> type, final @NotNull List<BinaryTag> tags) {
    if (tags.isEmpty()) return empty();
    if (type == BinaryTagTypes.END) throw new IllegalArgumentException("Cannot create a list of " + BinaryTagTypes.END);
    ListBinaryTagImpl.validateTagType(tags, type == BinaryTagTypes.LIST_WILDCARD);
    return new ListBinaryTagImpl(type, type == BinaryTagTypes.LIST_WILDCARD, new ArrayList<>(tags)); // explicitly copy
  }
Creates a tag.

<p>If {@code tags} is empty, {@link #empty()} will be returned.</p>

@param type the element type
@param tags the elements
@return a tag
@throws IllegalArgumentException if {@code type} is {@link BinaryTagTypes#END}, or if elements are of different types
@since 4.14.0
nbt/src/main/java/net/kyori/adventure/nbt/ListBinaryTag.java