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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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
ConstructorsConstructorDescriptionLocationData
(org.bukkit.Location location) Constructs a new LocationData instance from a given Location. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Location
Converts the serialized data back into a Location object.
-
Field Details
-
uuid
The unique identifier for the entity.This
UUID
uniquely identifies the entity within the application. -
yaw
private final float yawThe 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 pitchThe 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 xThe 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 yThe 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 zThe 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.
-