remove

fun remove(key: String): NBT?

Removes the specified key and its corresponding value from this compound.

fun remove(key: String, value: NBT): Boolean

Removes the entry for the specified key only if it is mapped to the specified value.