
walkmc.nbt.NamespacedKeyAdapter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of walk-server Show documentation
Show all versions of walk-server Show documentation
A spigot fork to kotlin structure and news.
package walkmc.nbt
import net.minecraft.server.*
import org.bukkit.entity.*
import walkmc.*
/**
* A tag adapter for adapting [Player].
*/
object NamespacedKeyAdapter : TagAdapter {
override fun load(key: String, tag: NBTTagCompound): NamespacedKey {
return NamespacedKey.from(tag.getString(key))
}
override fun save(key: String, value: NamespacedKey, tag: NBTTagCompound) {
tag.setString(key, value.toString())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy