TargetOptions

data class TargetOptions(val enabled: Boolean = true, val priority: Int = DEFAULT_PRIORITY, val acceptContraband: Boolean = false)

Per-target settings for a single DespawnLocation — the state behind the in-world toggle button and its options menu.

Serialisation is prefix-based and backward compatible. The historic on-disk form is x;y;z;world, and a world name may itself contain ; (the parser re-joins the tail), so options cannot simply be appended. Instead a non-default target is written as:

@enabled=false,priority=3|12;64;-8;my;world

A coordinate can never start with @, so the marker is unambiguous, and a target whose options are all default is written in exactly the old format — meaning existing data loads untouched and a server that never uses the feature never sees a format change.

Constructors

Link copied to clipboard
constructor(enabled: Boolean = true, priority: Int = DEFAULT_PRIORITY, acceptContraband: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

whether this target may receive items the void rules would otherwise destroy. Off by default — opting a chest in is a deliberate act.

Link copied to clipboard

whether this target participates in relocation at all. This is what the button toggles: false keeps the registration (and its options) but makes the pipeline skip it, which is what an admin wants when temporarily taking a chest out of service.

Link copied to clipboard

True when every field is at its default, i.e. the classic on-disk form is enough.

Link copied to clipboard

relative draw weight, 1–10. The pipeline picks candidate targets at random; a priority-3 target is three times as likely to be tried as a priority-1 one.

Functions

Link copied to clipboard

The key=value,… block, without the @ marker or the | terminator.