diff --git a/build.gradle b/build.gradle index 3715144..c18bbda 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ java { } group 'org.jglrxavpok.nbt' -version '1.1.4' +version '1.1.5' repositories { mavenCentral() diff --git a/src/main/kotlin/org/jglrxavpok/hephaistos/nbt/NBTCompound.kt b/src/main/kotlin/org/jglrxavpok/hephaistos/nbt/NBTCompound.kt index c200dc4..4063124 100644 --- a/src/main/kotlin/org/jglrxavpok/hephaistos/nbt/NBTCompound.kt +++ b/src/main/kotlin/org/jglrxavpok/hephaistos/nbt/NBTCompound.kt @@ -61,6 +61,11 @@ class NBTCompound(): NBT { return this } + /** + * Creates a list with the current available keys + */ + fun getKeys(): List = tags.keys.toList() + override fun toSNBT(): String { val tagStr = tags.map { entry -> "\"${entry.key.replace("\"", "\\\"")}\":${entry.value.toSNBT()}" @@ -71,7 +76,6 @@ class NBTCompound(): NBT { override fun toString() = toSNBT() - // Convenience methods /**