NBT-Manipulator

A kotlin/java lib that allows you to read and write NBT data in a clean way

View on GitHub

//nbt-manipulator/br.com.gamemods.nbtmanipulator/NbtList/NbtList

NbtList

[jvm]
fun <T : NbtTag> NbtList(tags: Collection<T>)

Constructs a NbtList with the same contents of the given Collection.

All items in the list must have the same class.

Null values in the list are not allowed.

The tags in the list will be linked so any modification will also change this tag contents.

[jvm]
fun NbtList()

Creates an empty list.

[jvm]
fun <T : NbtTag> NbtList(vararg tags: T)

fun <T : NbtTag> NbtList(tags: Iterable<T>)

fun <T : NbtTag> NbtList(tags: Sequence<T>)

fun <T : NbtTag> NbtList(tags: NbtList<T>)

Uses all tags as initial value of this list. Make sure to use the same class in all values.

[jvm]
fun NbtList(value: String)

Parses the string using the same structure which is returned by stringValue.

Parameters

jvm

   
value A string with a structure like [NbtInt(0), NbtInt(-32), NbtInt(48), NbtInt(127)]

Throws

   
kotlin.IllegalArgumentException if the string does not have the exact format outputted by stringValue