Package net.apartium.cocoabeans.spigot
Class Locations
java.lang.Object
net.apartium.cocoabeans.spigot.Locations
Bukkit locations systems helper methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<org.bukkit.Location>getLocationsBetween(org.bukkit.Location pos1, org.bukkit.Location pos2) Get all the locations between two positionsstatic booleanisSameWorld(org.bukkit.Location loc1, org.bukkit.Location loc2) Checking if the locations is in the same worldstatic org.bukkit.LocationtoLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Position position) Convert a position to a locationstatic org.bukkit.LocationtoLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Transform transform) Convert a transform to a locationstatic net.apartium.cocoabeans.space.PositiontoPosition(org.bukkit.Location location) Convert a location to a positionstatic net.apartium.cocoabeans.space.RotationtoRotation(org.bukkit.Location location) Convert a location to rotationstatic net.apartium.cocoabeans.space.TransformtoTransform(org.bukkit.Location location) Convert a location to rotationstatic org.bukkit.util.VectortoVector(net.apartium.cocoabeans.space.Position position) Convert a position to a vectorstatic org.bukkit.util.VectortoVector(net.apartium.cocoabeans.space.Transform transform) Convert a transform to a vector
-
Constructor Details
-
Locations
public Locations()
-
-
Method Details
-
isSameWorld
public static boolean isSameWorld(org.bukkit.Location loc1, org.bukkit.Location loc2) Checking if the locations is in the same world- Parameters:
loc1- the first locationloc2- the second location- Returns:
- true if those locations are in the same world, else false
-
getLocationsBetween
public static Set<org.bukkit.Location> getLocationsBetween(org.bukkit.Location pos1, org.bukkit.Location pos2) Get all the locations between two positions- Parameters:
pos1- the first positionpos2- the second position- Returns:
- the locations between those positions
-
toPosition
@AvailableSince("0.0.22") public static net.apartium.cocoabeans.space.Position toPosition(org.bukkit.Location location) Convert a location to a position- Parameters:
location- the location- Returns:
- the position
-
toRotation
@AvailableSince("0.0.30") public static net.apartium.cocoabeans.space.Rotation toRotation(org.bukkit.Location location) Convert a location to rotation- Parameters:
location- the location- Returns:
- the rotation
-
toTransform
@AvailableSince("0.0.30") public static net.apartium.cocoabeans.space.Transform toTransform(org.bukkit.Location location) Convert a location to rotation- Parameters:
location- the location- Returns:
- the transform
-
toLocation
@AvailableSince("0.0.22") public static org.bukkit.Location toLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Position position) Convert a position to a location- Parameters:
world- bukkit worldposition- cocoa beans position- Returns:
- the location
- See Also:
-
Position
-
toLocation
@AvailableSince("0.0.30") public static org.bukkit.Location toLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Transform transform) Convert a transform to a location- Parameters:
world- bukkit worldtransform- cocoa beans transform- Returns:
- the location
- See Also:
-
Transform
-
toVector
@AvailableSince("0.0.30") public static org.bukkit.util.Vector toVector(net.apartium.cocoabeans.space.Transform transform) Convert a transform to a vector- Parameters:
transform- cocoa beans transform- Returns:
- the vector
- See Also:
-
Transform
-
toVector
@AvailableSince("0.0.30") public static org.bukkit.util.Vector toVector(net.apartium.cocoabeans.space.Position position) Convert a position to a vector- Parameters:
position- cocoa beans transform- Returns:
- the vector
- See Also:
-
Position
-