DespawnLocation

data class DespawnLocation(val world: String, val x: Int, val y: Int, val z: Int, val owner: UUID)

A single despawn location: a block position (world name + integer block coords) owned by a player.

Deliberately server-independent and immutable — it holds a world name, not a live World, so it can be created, compared, indexed, and (de)serialised without a running server. That keeps the hot-path indexes cheap and makes the type fully unit-testable. Resolve to a live Location only when actually needed via toLocation.

Constructors

Link copied to clipboard
constructor(world: String, x: Int, y: Int, z: Int, owner: UUID)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The position component, without the owner — the LocationStore spatial key.

Link copied to clipboard
val owner: UUID
Link copied to clipboard
Link copied to clipboard
val x: Int
Link copied to clipboard
val y: Int
Link copied to clipboard
val z: Int

Functions

Link copied to clipboard

Serialised form stored in each owner's file: x;y;z;world. The owner is implied by which file the entry lives in, so it is not part of the string (kept byte-compatible with the original on-disk format).

Link copied to clipboard
fun toLocation(): Location?

Resolves to a Bukkit Location if the world is currently loaded, else null.