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

    Constructors
    Constructor
    Description
    Location2D(org.bukkit.World world, double x, double z)
    Constructs a Location2D location
    Location2D(org.bukkit.World world, double x, double y, double z)
    Constructs a Location2D location
    Location2D(org.bukkit.World world, double x, double y, double z, float yaw, float pitch)
    Constructs a Location2D location
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    double
     
    void
    setY(double y)
    Throws a Location2DException

    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, zero

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.papermc.paper.math.FinePosition

    blockX, blockY, blockZ, isBlock, isFine, offset, offset, toBlock

    Methods 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 resides
      x - the x-coordinate of this location
      y - the y-coordinate of this location
      z - the z-coordinate of this location
      yaw - the absolute rotation on the x-plane, in degrees
      pitch - 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 resides
      x - the x-coordinate of this location
      y - the y-coordinate of this location
      z - 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 resides
      x - the x-coordinate of this location
      z - the z-coordinate of this location
  • Method Details

    • getY

      public double getY()
      Overrides:
      getY in class org.bukkit.Location
      Returns:
      A Location2DException
    • getBlockY

      public int getBlockY()
      Overrides:
      getBlockY in class org.bukkit.Location
      Returns:
      A Location2DException
    • setY

      public void setY(double y)
      Throws a Location2DException
      Overrides:
      setY in class org.bukkit.Location
      Parameters:
      y - y-coordinate