setLocation

fun setLocation(holder: PersistentDataHolder, key: NamespacedKey, location: Location?)

Stores a Location (world, x/y/z, yaw/pitch) as a nested container under key; null removes it.


fun setLocation(item: ItemStack, key: NamespacedKey, location: Location?): ItemStack

Stores a Location as a nested container under key on an item; null removes it. Returns the stack.