Class LocationData

java.lang.Object
com.ranull.graves.data.LocationData
All Implemented Interfaces:
Serializable

public class LocationData extends Object implements Serializable
Represents serialized location data including world UUID, coordinates, and orientation.
See Also:
  • 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 World reference and constructs a Location; it does not schedule any thread/region actions. Ensure you use the returned Location on the correct region thread.

      Returns:
      The deserialized Location, or null if the world cannot be resolved.