Package me.bimmr.bimmcore.misc
Class Coords
- java.lang.Object
-
- me.bimmr.bimmcore.misc.Coords
-
public class Coords extends java.lang.ObjectA wrapper for easy to serialize location data
-
-
Constructor Summary
Constructors Constructor Description Coords(java.lang.String string)Instantiates a new Coords.Coords(org.bukkit.Location loc)Instantiates a new Coords.Coords(org.bukkit.World world, int x, int y, int z)Instantiates a new Coords.Coords(org.bukkit.World world, int x, int y, int z, float yaw, float pitch)Instantiates a new Coords.
-
Method Summary
Modifier and Type Method Description org.bukkit.LocationasLocation()As location location.static org.bukkit.LocationasLocation(java.lang.String string)As location location.org.bukkit.LocationasLocationIgnoreYawAndPitch()As location ignore yaw and pitch location.static org.bukkit.LocationasLocationIgnoreYawAndPitch(java.lang.String string)As location ignore yaw and pitch location.floatgetPitch()Gets pitch.java.lang.StringgetWorld()Gets world.intgetX()Gets x.intgetY()Gets y.floatgetYaw()Gets yaw.intgetZ()Gets z.static java.util.ArrayList<java.lang.String>listFromCoords(java.util.List<Coords> list)List from coords array list.static java.util.ArrayList<Coords>listFromString(java.util.List<java.lang.String> list)List from string array list.voidsetPitch(float pitch)Sets pitch.voidsetWorld(java.lang.String world)Sets world.voidsetX(int x)Sets x.voidsetY(int y)Sets y.voidsetYaw(float yaw)Sets yaw.voidsetZ(int z)Sets z.java.lang.StringtoString()static java.lang.StringtoString(org.bukkit.Location location)To string string.java.lang.StringtoStringIgnoreYawAndPitch()To string ignore yaw and pitch string.static java.lang.StringtoStringIgnoreYawAndPitch(org.bukkit.Location location)To string ignore yaw and pitch string.
-
-
-
Constructor Detail
-
Coords
public Coords(org.bukkit.Location loc)
Instantiates a new Coords.- Parameters:
loc- the loc
-
Coords
public Coords(java.lang.String string)
Instantiates a new Coords.- Parameters:
string- the string
-
Coords
public Coords(org.bukkit.World world, int x, int y, int z)Instantiates a new Coords.- Parameters:
world- the worldx- the xy- the yz- the z
-
Coords
public Coords(org.bukkit.World world, int x, int y, int z, float yaw, float pitch)Instantiates a new Coords.- Parameters:
world- the worldx- the xy- the yz- the zyaw- the yawpitch- the pitch
-
-
Method Detail
-
listFromString
public static java.util.ArrayList<Coords> listFromString(java.util.List<java.lang.String> list)
List from string array list.- Parameters:
list- the list- Returns:
- the array list
-
listFromCoords
public static java.util.ArrayList<java.lang.String> listFromCoords(java.util.List<Coords> list)
List from coords array list.- Parameters:
list- the list- Returns:
- the array list
-
asLocation
public static org.bukkit.Location asLocation(java.lang.String string)
As location location.- Parameters:
string- the string- Returns:
- the location
-
asLocationIgnoreYawAndPitch
public static org.bukkit.Location asLocationIgnoreYawAndPitch(java.lang.String string)
As location ignore yaw and pitch location.- Parameters:
string- the string- Returns:
- the location
-
toString
public static java.lang.String toString(org.bukkit.Location location)
To string string.- Parameters:
location- the location- Returns:
- the string
-
toStringIgnoreYawAndPitch
public static java.lang.String toStringIgnoreYawAndPitch(org.bukkit.Location location)
To string ignore yaw and pitch string.- Parameters:
location- the location- Returns:
- the string
-
asLocation
public org.bukkit.Location asLocation()
As location location.- Returns:
- the location
-
asLocationIgnoreYawAndPitch
public org.bukkit.Location asLocationIgnoreYawAndPitch()
As location ignore yaw and pitch location.- Returns:
- the location
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringIgnoreYawAndPitch
public java.lang.String toStringIgnoreYawAndPitch()
To string ignore yaw and pitch string.- Returns:
- the string
-
getWorld
public java.lang.String getWorld()
Gets world.- Returns:
- the world
-
setWorld
public void setWorld(java.lang.String world)
Sets world.- Parameters:
world- the world
-
getX
public int getX()
Gets x.- Returns:
- the x
-
setX
public void setX(int x)
Sets x.- Parameters:
x- the x
-
getY
public int getY()
Gets y.- Returns:
- the y
-
setY
public void setY(int y)
Sets y.- Parameters:
y- the y
-
getZ
public int getZ()
Gets z.- Returns:
- the z
-
setZ
public void setZ(int z)
Sets z.- Parameters:
z- the z
-
getPitch
public float getPitch()
Gets pitch.- Returns:
- the pitch
-
setPitch
public void setPitch(float pitch)
Sets pitch.- Parameters:
pitch- the pitch
-
getYaw
public float getYaw()
Gets yaw.- Returns:
- the yaw
-
setYaw
public void setYaw(float yaw)
Sets yaw.- Parameters:
yaw- the yaw
-
-