DespawnLocation

data class DespawnLocation(val world: String, val x: Int, val y: Int, val z: Int, val owner: UUID, val options: TargetOptions = TargetOptions.DEFAULT)

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, options: TargetOptions = TargetOptions.DEFAULT)

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

Shorthand used on the relocation hot path.

Link copied to clipboard

Per-target settings (on/off, priority, contraband opt-in) — the state behind the in-world toggle button. Defaulted so every existing call site is unchanged and a target that has never been configured costs nothing extra on disk.

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. A target with default options is written as x;y;z;world — byte-compatible with the original on-disk format — and one with non-default options is prefixed with @key=value,…|. See TargetOptions for why the options go in front rather than at the end.

Link copied to clipboard
fun toLocation(): Location?

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