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 MethodsModifier and TypeMethodDescriptionstatic ConfirmedLocationStatic factory method to create anImmutableLocaltionstatic ConfirmedLocationof(org.bukkit.Location location) Static factory method to create anImmutableLocaltion
-
Method Details
-
of
Static factory method to create anImmutableLocaltion- Parameters:
location- a BukkitLocation- Returns:
- an instance of an
ConfirmedLocationof 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 anImmutableLocaltion- Returns:
- an instance of an
ConfirmedLocationof the appropriate subtype
-