Class LocationManipulation
- java.lang.Object
-
- com.onarandombox.MultiverseCore.utils.LocationManipulation
-
@Deprecated public class LocationManipulation extends java.lang.Object
Deprecated.Use instead:LocationManipulation
andSimpleLocationManipulation
.Utility class to manipulate locations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.bukkit.Location
getBlockLocation(org.bukkit.Location l)
Deprecated.This method simply does some rounding, rather than forcing a call to the server to get the blockdata.static java.lang.String
getDirection(org.bukkit.Location location)
Deprecated.Return the NESW Direction a Location is facing.static org.bukkit.Location
getNextBlock(org.bukkit.entity.Vehicle v)
Deprecated.Returns the next Location that aVehicle
is traveling at.static float
getSpeed(org.bukkit.util.Vector v)
Deprecated.Returns a speed float from a given vector.static org.bukkit.util.Vector
getTranslatedVector(org.bukkit.util.Vector v, java.lang.String direction)
Deprecated.Returns a translated vector from the given direction.static float
getYaw(java.lang.String orientation)
Deprecated.Returns the float yaw position for the given cardinal direction.static java.lang.String
locationToString(org.bukkit.Location location)
Deprecated.Convert a Location into a Colon separated string to allow us to store it in text.static java.lang.String
strCoords(org.bukkit.Location l)
Deprecated.Returns a colored string with the coords.static java.lang.String
strCoordsRaw(org.bukkit.Location l)
Deprecated.Converts a location to a printable readable formatted string including pitch/yaw.static org.bukkit.Location
stringToLocation(java.lang.String locationString)
Deprecated.Returns a new location from a given string.
-
-
-
Method Detail
-
locationToString
public static java.lang.String locationToString(org.bukkit.Location location)
Deprecated.Convert a Location into a Colon separated string to allow us to store it in text.WORLD:X,Y,Z:yaw:pitch
The corresponding String2Loc function is
stringToLocation(java.lang.String)
- Parameters:
location
- The Location to save.- Returns:
- The location as a string in this format: WORLD:x,y,z:yaw:pitch
-
getBlockLocation
public static org.bukkit.Location getBlockLocation(org.bukkit.Location l)
Deprecated.This method simply does some rounding, rather than forcing a call to the server to get the blockdata.- Parameters:
l
- The location to round to the block location- Returns:
- A rounded location.
-
stringToLocation
public static org.bukkit.Location stringToLocation(java.lang.String locationString)
Deprecated.Returns a new location from a given string. The format is as follows:WORLD:X,Y,Z:yaw:pitch
The corresponding Location2String function is
stringToLocation(java.lang.String)
- Parameters:
locationString
- The location represented as a string (WORLD:X,Y,Z:yaw:pitch)- Returns:
- A new location defined by the string or null if the string was invalid.
-
strCoords
public static java.lang.String strCoords(org.bukkit.Location l)
Deprecated.Returns a colored string with the coords.- Parameters:
l
- TheLocation
- Returns:
- The
String
-
strCoordsRaw
public static java.lang.String strCoordsRaw(org.bukkit.Location l)
Deprecated.Converts a location to a printable readable formatted string including pitch/yaw.- Parameters:
l
- TheLocation
- Returns:
- The
String
-
getDirection
public static java.lang.String getDirection(org.bukkit.Location location)
Deprecated.Return the NESW Direction a Location is facing.- Parameters:
location
- TheLocation
- Returns:
- The NESW Direction
-
getYaw
public static float getYaw(java.lang.String orientation)
Deprecated.Returns the float yaw position for the given cardinal direction.- Parameters:
orientation
- The cardinal direction- Returns:
- The yaw
-
getSpeed
public static float getSpeed(org.bukkit.util.Vector v)
Deprecated.Returns a speed float from a given vector.- Parameters:
v
- TheVector
- Returns:
- The speed
-
getTranslatedVector
public static org.bukkit.util.Vector getTranslatedVector(org.bukkit.util.Vector v, java.lang.String direction)
Deprecated.Returns a translated vector from the given direction.- Parameters:
v
- The oldVector
direction
- The new direction- Returns:
- The translated
Vector
-
getNextBlock
public static org.bukkit.Location getNextBlock(org.bukkit.entity.Vehicle v)
Deprecated.Returns the next Location that aVehicle
is traveling at.- Parameters:
v
- TheVehicle
- Returns:
- The
Location
-
-