Class LocationSpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.util.implementations.LocationSpigot
- All Implemented Interfaces:
ILocation
Represents an implementation of
ILocation for the Spigot platform.-
Constructor Summary
ConstructorsConstructorDescriptionLocationSpigot(IWorld world, double x, double y, double z) LocationSpigot(IWorld world, @Nullable org.bukkit.World bukkitWorld, double x, double y, double z) LocationSpigot(org.bukkit.Location location) LocationSpigot(org.bukkit.World world, double x, double y, double z) -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Adds values to the coordinates of this location.Adds values to the coordinates of this location.Adds values to the coordinates of this location.booleanorg.bukkit.block.BlockgetBlock()Gets theBlockat the given location.intGets the X value of this location.intGets the Y value of this location.intGets the Z value of this location.org.bukkit.LocationGets the bukkit location represented by thisILocationgetChunk()Gets the chunk coordinates of the chunk this location is in.getWorld()Gets the world of this location.doublegetX()Gets the X value of this location.doublegetY()Gets the Y value of this location.doublegetZ()Gets the Z value of this location.inthashCode()setX(double newVal) Changes the x coordinate.setY(double newVal) Changes the y coordinate.setZ(double newVal) Changes the z coordinate.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.api.ILocation
getPosition, getPositionDouble, toDoublePositionString, toIntPositionString
-
Constructor Details
-
LocationSpigot
public LocationSpigot(IWorld world, @Nullable @Nullable org.bukkit.World bukkitWorld, double x, double y, double z) -
LocationSpigot
-
LocationSpigot
public LocationSpigot(org.bukkit.World world, double x, double y, double z) -
LocationSpigot
public LocationSpigot(org.bukkit.Location location)
-
-
Method Details
-
getChunk
Description copied from interface:ILocationGets the chunk coordinates of the chunk this location is in. -
getBlockX
@CheckReturnValue @Contract(pure=true) public int getBlockX()Description copied from interface:ILocationGets the X value of this location. -
getBlockY
@CheckReturnValue @Contract(pure=true) public int getBlockY()Description copied from interface:ILocationGets the Y value of this location. -
getBlockZ
@CheckReturnValue @Contract(pure=true) public int getBlockZ()Description copied from interface:ILocationGets the Z value of this location. -
getX
@CheckReturnValue @Contract(pure=true) public double getX()Description copied from interface:ILocationGets the X value of this location. -
getY
@CheckReturnValue @Contract(pure=true) public double getY()Description copied from interface:ILocationGets the Y value of this location. -
getZ
@CheckReturnValue @Contract(pure=true) public double getZ()Description copied from interface:ILocationGets the Z value of this location. -
setX
Description copied from interface:ILocationChanges the x coordinate. -
setY
Description copied from interface:ILocationChanges the y coordinate. -
setZ
Description copied from interface:ILocationChanges the z coordinate.@CheckReturnValue -
add
Description copied from interface:ILocationAdds values to the coordinates of this location. -
add
Description copied from interface:ILocationAdds values to the coordinates of this location. -
add
Description copied from interface:ILocationAdds values to the coordinates of this location. -
getBlock
@CheckReturnValue @Contract(pure=true) public org.bukkit.block.Block getBlock()Gets theBlockat the given location.See
Location.getBlock().- Returns:
- The block at this location.
-
getBukkitLocation
@CheckReturnValue @Contract(pure=true) public org.bukkit.Location getBukkitLocation()Gets the bukkit location represented by thisILocation- Returns:
- The Bukkit location.
-
toString
-
equals
-
hashCode
@CheckReturnValue @Contract(pure=true) public int hashCode() -
getWorld
Description copied from interface:ILocationGets the world of this location.
-