public class Location3D
extends java.lang.Object
Location
class.Constructor and Description |
---|
Location3D(double x,
double y,
double z)
Deprecated.
Use
Vector3f |
Location3D(float x,
float y,
float z)
Deprecated.
Use
Vector3f |
Location3D(int x,
int y,
int z)
Deprecated.
Use
Vector3f |
Location3D(java.lang.String world,
double x,
double y,
double z)
Creates a new Location3D from the given points.
|
Location3D(java.lang.String world,
float x,
float y,
float z)
Creates a new Location3D from the given points.
|
Location3D(java.lang.String world,
float x,
float y,
float z,
float pitch,
float yaw)
Creates a new Location3D from the given points.
|
Location3D(java.lang.String world,
int x,
int y,
int z)
Creates a new Location3D from the given points.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object otherObject) |
float |
getPitch()
Retrieves the pitch of this location.
|
Vector3f |
getPosition()
Returns the position of this location.
|
Vector2f |
getRotation()
Returns the rotation of this location.
|
java.lang.String |
getWorld()
Retrieves the name of the world of this location.
|
float |
getX()
Retrieves the x-coordinate of this location.
|
float |
getY()
Retrieves the y-coordinate of this location.
|
float |
getYaw()
Retrieves the yaw of this location.
|
float |
getZ()
Retrieves the z-coordinate of this location.
|
int |
hashCode() |
void |
setPitch(double pitch)
Sets the pitch of this location.
|
void |
setPitch(float pitch)
Sets the pitch of this location.
|
void |
setPitch(int pitch)
Sets the pitch of this location.
|
void |
setPosition(Vector3f position)
Sets the position of this location.
|
void |
setRotation(Vector2f rotation)
Sets the rotation of this location.
|
void |
setWorld(java.lang.String world)
Sets the name of the world of this location.
|
void |
setX(double x)
Sets the x-coordinate of this location.
|
void |
setX(float x)
Sets the x-coordinate of this location.
|
void |
setX(int x)
Sets the x-coordinate of this location.
|
void |
setY(double y)
Sets the y-coordinate of this location.
|
void |
setY(float y)
Sets the y-coordinate of this location.
|
void |
setY(int y)
Sets the y-coordinate of this location.
|
void |
setYaw(double yaw)
Sets the yaw of this location.
|
void |
setYaw(float yaw)
Sets the yaw of this location.
|
void |
setYaw(int yaw)
Sets the yaw of this location.
|
void |
setZ(double z)
Sets the z-coordinate of this location.
|
void |
setZ(float z)
Sets the z-coordinate of this location.
|
void |
setZ(int z)
Sets the z-coordinate of this location.
|
static Location3D |
valueOf(org.bukkit.Location location)
Deprecated.
Depends on Bukkit
|
static Location3D |
valueOf(org.bukkit.Location location,
boolean copyOrientation)
Deprecated.
Depends on Bukkit
|
public Location3D(java.lang.String world, float x, float y, float z, float pitch, float yaw)
world
- the name of the world containing the location.x
- the x-coordinate of the locationy
- the y-coordinate of the locationz
- the z-coordinate of the locationpitch
- the pitch of the locationyaw
- the yaw of the locationpublic Location3D(java.lang.String world, float x, float y, float z)
world
- the name of the world containing the location.x
- the x-coordinate of the locationy
- the y-coordinate of the locationz
- the z-coordinate of the locationpublic Location3D(java.lang.String world, double x, double y, double z)
world
- the name of the world containing the location.x
- the x-coordinate of the location.y
- the y-coordinate of the location.z
- the z-coordinate of the location.public Location3D(java.lang.String world, int x, int y, int z)
world
- the name of the world containing the location.x
- the x-coordinate of the location.y
- the y-coordinate of the location.z
- the z-coordinate of the location.@Deprecated public Location3D(float x, float y, float z)
Vector3f
x
- the x-coordinate of the location.y
- the y-coordinate of the location.z
- the z-coordinate of the location.@Deprecated public Location3D(double x, double y, double z)
Vector3f
x
- the x-coordinate of the location.y
- the y-coordinate of the location.z
- the z-coordinate of the location.@Deprecated public Location3D(int x, int y, int z)
Vector3f
x
- the x-coordinate of the location.y
- the y-coordinate of the location.z
- the z-coordinate of the location.public java.lang.String getWorld()
public void setWorld(java.lang.String world)
world
- the name of the world of this location, or null if one was
not provided.public Vector3f getPosition()
Vector3f
public void setPosition(Vector3f position)
position
- the new position of this locaitonpublic float getX()
public float getY()
public float getZ()
public void setX(float x)
x
- the new x-coordinate of this location.public void setX(double x)
x
- the new x-coordinate of this location.public void setX(int x)
x
- the new x-coordinate of this location.public void setY(float y)
y
- the new y-coordinate of this location.public void setY(double y)
y
- the new y-coordinate of this location.public void setY(int y)
y
- the new y-coordinate of this location.public void setZ(float z)
z
- the new z-coordinate of this location.public void setZ(double z)
z
- the new z-coordinate of this location.public void setZ(int z)
z
- the new z-coordinate of this location.public Vector2f getRotation()
Vector2f
public void setRotation(Vector2f rotation)
rotation
- the new rotation of this locaitonpublic float getPitch()
public float getYaw()
public void setPitch(float pitch)
pitch
- the new pitch of this location.public void setPitch(double pitch)
pitch
- the new pitch of this location.public void setPitch(int pitch)
pitch
- the new pitch of this location.public void setYaw(float yaw)
yaw
- the new yaw of this location.public void setYaw(double yaw)
yaw
- the new yaw of this location.public void setYaw(int yaw)
yaw
- the new yaw of this location.@Deprecated public static Location3D valueOf(org.bukkit.Location location)
Bukkit location
.location
- the Bukkit location
to create a
Location3D from.@Deprecated public static Location3D valueOf(org.bukkit.Location location, boolean copyOrientation)
Bukkit location
.location
- the Bukkit location
to create a
Location3D from.copyOrientation
- whether the pitch and yaw of location
will be stored in the new Location3D
.public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object