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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The pitch (rotation around the horizontal axis) of the entity.
    private final UUID
    The unique identifier for the entity.
    private final double
    The x-coordinate of the entity's position.
    private final double
    The y-coordinate of the entity's position.
    private final float
    The yaw (rotation around the vertical axis) of the entity.
    private final double
    The z-coordinate of the entity's position.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocationData(org.bukkit.Location location)
    Constructs a new LocationData instance from a given Location.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.Location
    Converts the serialized data back into a Location object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • uuid

      private final UUID uuid
      The unique identifier for the entity.

      This UUID uniquely identifies the entity within the application.

    • yaw

      private final float yaw
      The yaw (rotation around the vertical axis) of the entity.

      This float value represents the yaw of the entity, which controls its horizontal orientation.

    • pitch

      private final float pitch
      The pitch (rotation around the horizontal axis) of the entity.

      This float value represents the pitch of the entity, which controls its vertical orientation.

    • x

      private final double x
      The x-coordinate of the entity's position.

      This double value represents the entity's location on the x-axis in the world.

    • y

      private final double y
      The y-coordinate of the entity's position.

      This double value represents the entity's location on the y-axis in the world.

    • z

      private final double z
      The z-coordinate of the entity's position.

      This double value represents the entity's location on the z-axis in the world.

  • 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.
      Returns:
      The deserialized Location, or null if the world UUID is not available.