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 a displayName and a location. The key() 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
  • Class
    Description
    Represents an immutable location and a corresponding display name.
    Record class that represents a Home destination
    Record class that represents an invalid destination
    Record class that represents a Spawn destination
    Record class that represents a user-created destination, which can be persisted in the datastore
     
    Record class that Represents a valid destination with accessor methods for destination fields and derived values