Package com.ranull.graves.data
Class LocationData
java.lang.Object
com.ranull.graves.data.LocationData
- All Implemented Interfaces:
Serializable
Represents serialized location data including world UUID, coordinates, and orientation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLocationData(org.bukkit.Location location) Constructs a new LocationData instance from a given Location. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationConverts the serialized data back into a Location object.
-
Constructor Details
-
LocationData
public LocationData(org.bukkit.Location location) Constructs a new LocationData instance from a given Location.- Parameters:
location- The location to serialize.
-
-
Method Details
-
getLocation
public org.bukkit.Location getLocation()Converts the serialized data back into a Location object.On Folia and other Paper-family servers, this attempts resolution by world UUID first, then by namespaced key (if present), and finally by legacy world name. This method only resolves the
Worldreference and constructs aLocation; it does not schedule any thread/region actions. Ensure you use the returnedLocationon the correct region thread.- Returns:
- The deserialized Location, or null if the world cannot be resolved.
-