Package dev.jorel.commandapi.wrappers
Class Location2D
java.lang.Object
org.bukkit.Location
dev.jorel.commandapi.wrappers.Location2D
- All Implemented Interfaces:
io.papermc.paper.math.FinePosition,io.papermc.paper.math.Position,Cloneable,org.bukkit.configuration.serialization.ConfigurationSerializable
public class Location2D
extends org.bukkit.Location
A class that represents a Location in the x and z directions. This class
extends Location, so can be used anywhere a regular Location could be used.
-
Field Summary
Fields inherited from interface io.papermc.paper.math.Position
BLOCK_ZERO, FINE_ZERO -
Constructor Summary
ConstructorsConstructorDescriptionLocation2D(org.bukkit.World world, double x, double z) Constructs a Location2D locationLocation2D(org.bukkit.World world, double x, double y, double z) Constructs a Location2D locationLocation2D(org.bukkit.World world, double x, double y, double z, float yaw, float pitch) Constructs a Location2D location -
Method Summary
Methods inherited from class org.bukkit.Location
add, add, add, add, checkFinite, clone, createExplosion, createExplosion, createExplosion, createExplosion, createExplosion, createExplosion, deserialize, distance, distanceSquared, equals, getBlock, getBlockX, getBlockZ, getChunk, getDirection, getNearbyEntities, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getPitch, getWorld, getX, getYaw, getZ, hashCode, isChunkLoaded, isGenerated, isWorldLoaded, length, lengthSquared, locToBlock, multiply, normalizePitch, normalizeYaw, serialize, set, setDirection, setPitch, setWorld, setX, setYaw, setZ, subtract, subtract, subtract, subtract, toBlockKey, toBlockLocation, toCenterLocation, toHighestLocation, toHighestLocation, toHighestLocation, toLocation, toString, toVector, x, y, z, zeroMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.papermc.paper.math.FinePosition
blockX, blockY, blockZ, isBlock, isFine, offset, offset, toBlockMethods inherited from interface io.papermc.paper.math.Position
toCenter
-
Constructor Details
-
Location2D
public Location2D(org.bukkit.World world, double x, double y, double z, float yaw, float pitch) Constructs a Location2D location- Parameters:
world- the world in which this location residesx- the x-coordinate of this locationy- the y-coordinate of this locationz- the z-coordinate of this locationyaw- the absolute rotation on the x-plane, in degreespitch- the absolute rotation on the y-plane, in degrees
-
Location2D
public Location2D(org.bukkit.World world, double x, double y, double z) Constructs a Location2D location- Parameters:
world- the world in which this location residesx- the x-coordinate of this locationy- the y-coordinate of this locationz- the z-coordinate of this location
-
Location2D
public Location2D(org.bukkit.World world, double x, double z) Constructs a Location2D location- Parameters:
world- the world in which this location residesx- the x-coordinate of this locationz- the z-coordinate of this location
-
-
Method Details
-
getY
public double getY()- Overrides:
getYin classorg.bukkit.Location- Returns:
- A Location2DException
-
getBlockY
public int getBlockY()- Overrides:
getBlockYin classorg.bukkit.Location- Returns:
- A Location2DException
-
setY
public void setY(double y) Throws a Location2DException- Overrides:
setYin classorg.bukkit.Location- Parameters:
y- y-coordinate
-