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 floatThe pitch (rotation around the horizontal axis) of the entity.private final UUIDThe unique identifier for the entity.private final doubleThe x-coordinate of the entity's position.private final doubleThe y-coordinate of the entity's position.private final floatThe yaw (rotation around the vertical axis) of the entity.private final doubleThe 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.LocationConverts the serialized data back into a Location object.
-
Field Details
-
uuid
The unique identifier for the entity.This
UUIDuniquely identifies the entity within the application. -
yaw
private final float yawThe yaw (rotation around the vertical axis) of the entity.This
floatvalue 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
floatvalue represents the pitch of the entity, which controls its vertical orientation. -
x
private final double xThe x-coordinate of the entity's position.This
doublevalue 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
doublevalue 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
doublevalue 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.
-