NBT-API

NBT-API

98.9k Downloads

Set a list.

NERDTimmie opened this issue ยท 3 comments

commented

There is a method to get a Integer list but not a setter.

So how would is set a Integer list?

commented

You don't need to set it. The list you get from the getter is linked to the compound and updates the internal values.

commented

So you add a compound and then add extra entrys?
EG. i have 5 intergers i want to add. but no key for them who would i do that?

commented

List<Integer> list = nbt.getIntegerList("somekeyname")
list.add(123)

Thats it, add/remove behave the same as a setter/the remove method.