Interface ConfirmedLocation

All Known Implementing Classes:
InvalidLocation, NoWorldLocation, UnloadedWorldLocation, ValidLocation

public sealed interface ConfirmedLocation permits ValidLocation, InvalidLocation, NoWorldLocation, UnloadedWorldLocation
Represents a validated, type-safe Location. Returns an appropriate subtype based on the results of validation.

Note: The server world referenced by the uuid stored in this object may still become invalid after object creation. There can be no guarantee that a world referenced by this object remains available. However, objects that implement this interface are immutable, and may still be used to create or update records in the datastore, or used to display messages.

  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    of(String worldName, UUID worldUid, double x, double y, double z, float yaw, float pitch)
    Static factory method to create an ImmutableLocaltion
    of(org.bukkit.Location location)
    Static factory method to create an ImmutableLocaltion
  • Method Details

    • of

      static ConfirmedLocation of(org.bukkit.Location location)
      Static factory method to create an ImmutableLocaltion
      Parameters:
      location - a Bukkit Location
      Returns:
      an instance of an ConfirmedLocation of the appropriate subtype
    • of

      static ConfirmedLocation of(String worldName, UUID worldUid, double x, double y, double z, float yaw, float pitch)
      Static factory method to create an ImmutableLocaltion
      Returns:
      an instance of an ConfirmedLocation of the appropriate subtype