Package com.winterhavenmc.lodestar.models.destination
package com.winterhavenmc.lodestar.models.destination
Provides types representing abstract in-game destinations.
The Destination sealed interface represents a general abstraction of a target location
within the Minecraft world. It unifies concepts such as homes, spawns, stored waypoints, and invalid destinations
for use cases including teleportation, message display, and persistent storage.
There are two permitted types of Destination:
ValidDestination– Represents a fully resolved and usable destination, consisting of adisplayNameand alocation. Thekey()method provides a derived identifier based on the display name.InvalidDestination– Represents a destination that could not be resolved, including a display name and a human-readable reason for invalidity.
Permitted implementations of ValidDestination are:
HomeDestination– A player's bedspawn or other respawn location.SpawnDestination– A world or server spawn point.StoredDestination– A destination persisted in a resource or datastore.
All destination types are implemented as immutable Java record classes and designed to
support identity, serialization, and display formatting. They may be used in commands, data persistence,
and as arguments to systems requiring a Location.
- Since:
- 1.0
- Author:
- Tim Savage
-
ClassDescriptionRepresents an immutable location and a corresponding display name.Record class that represents a Home destinationRecord class that represents an invalid destinationRecord class that represents a Spawn destinationRecord class that represents a user-created destination, which can be persisted in the datastoreRecord class that Represents a valid destination with accessor methods for destination fields and derived values