Add getRotation to Location (#12799)
This commit is contained in:
parent
22d80a3b3b
commit
a6e0c08fdf
1 changed files with 11 additions and 0 deletions
|
@ -425,6 +425,17 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
|||
return addRotation(rotation.yaw(), rotation.pitch());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the rotation of this location.
|
||||
*
|
||||
* @return a new {@code Rotation} object
|
||||
*/
|
||||
@NotNull
|
||||
@Contract(value = " -> new", pure = true)
|
||||
public Rotation getRotation() {
|
||||
return Rotation.rotation(yaw, pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtracts the location by another.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue