Class WorldPoint

java.lang.Object
com.marcusslover.plus.lib.world.WorldPoint

@Deprecated(forRemoval=true) public class WorldPoint extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. Unlike Vector, Positions allow us to store a yaw and pitch as well as being easily serializable.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.marcusslover.plus.lib.world.WorldPoint.WorldPointAdapter
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    WorldPoint(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    WorldPoint(double x, double y, double z, float yaw, float pitch)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    WorldPoint(org.bukkit.Location location)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add x, y, z to WorldPoint
    add(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add a WorldPoint to WorldPoint
    org.bukkit.Location
    asLocation(org.bukkit.World world)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Location object from this WorldPoint.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility method that will set the coordinates to the bottom center of the WorldPoint
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility method that get the center of this WorldPoint on the x, y, z axis
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    double
    distance(double x1, double y1, double z1)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Computes the distance between this WorldPoint and WorldPoint (x1, y1, z1).
    double
    distance(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Computes the distance between this WorldPoint and the specified WorldPoint.
    double
    distanceSquared(double x1, double y1, double z1)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Computes the distance between this WorldPoint and WorldPoint (x1, y1, z1).
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Computes the distance between this WorldPoint and the specified WorldPoint.
    divide(double amount)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Divide a WorldPoint (x, y, z) by a double value
    divide(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Divide a WorldPoint by x, y, z
    divide(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Divide a WorldPoint by another WorldPoint.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    isChunkLoaded(org.bukkit.World world)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check if the chunk is loaded in the world for this WorldPoint
    midpoint(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a position which lies in the middle between this position and the specified coordinates.
    midpoint(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a WorldPoint which lies in the middle between this WorldPoint and the specified WorldPoint.
    multiply(double amount)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Multiply a WorldPoint (x, y, z) by a double value
    multiply(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Multiply a WorldPoint by x, y, z
    multiply(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Multiply a WorldPoint by another WorldPoint.
    static WorldPoint
    of(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.
    static WorldPoint
    of(double x, double y, double z, float yaw, float pitch)
    Deprecated, for removal: This API element is subject to removal in a future version.
    WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.
    static WorldPoint
    of(org.bukkit.Location location)
    Deprecated, for removal: This API element is subject to removal in a future version.
    WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.
    subtract(double x, double y, double z)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add x, y, z to WorldPoint
    subtract(WorldPoint worldPoint)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Subtract a WorldPoint to WorldPoint
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility method that will set the coordinates to the top center of the WorldPoint
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.bukkit.util.Vector
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility method that will floor all values of this WorldPoint

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ADAPTER

      public static final com.marcusslover.plus.lib.world.WorldPoint.WorldPointAdapter ADAPTER
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • WorldPoint

      public WorldPoint()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • WorldPoint

      public WorldPoint(org.bukkit.Location location)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • WorldPoint

      public WorldPoint(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • WorldPoint

      public WorldPoint(double x, double y, double z, float yaw, float pitch)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • WorldPoint

      public WorldPoint(String string)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • of

      public static WorldPoint of(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. Unlike Vector, Positions allow us to store a yaw and pitch as well as being easily serializable.
    • of

      public static WorldPoint of(double x, double y, double z, float yaw, float pitch)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. Unlike Vector, Positions allow us to store a yaw and pitch as well as being easily serializable.
    • of

      public static WorldPoint of(org.bukkit.Location location)
      Deprecated, for removal: This API element is subject to removal in a future version.
      WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. Unlike Vector, Positions allow us to store a yaw and pitch as well as being easily serializable.
    • asLocation

      public org.bukkit.Location asLocation(org.bukkit.World world)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Location object from this WorldPoint.
      Parameters:
      world - some valid bukkit world
      Returns:
      Location
    • distance

      public double distance(double x1, double y1, double z1)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Computes the distance between this WorldPoint and WorldPoint (x1, y1, z1).
      Parameters:
      x1 - the x coordinate of other WorldPoint
      y1 - the y coordinate of other WorldPoint
      z1 - the z coordinate of other WorldPoint
      Returns:
      the distance between this WorldPoint and WorldPoint (x1, y1, z1).
    • distance

      public double distance(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Computes the distance between this WorldPoint and the specified WorldPoint.
      Parameters:
      worldPoint - the other WorldPoint
      Returns:
      the distance between this WorldPoint and the specified WorldPoint.
      Throws:
      NullPointerException - if the specified WorldPoint is null
    • distanceSquared

      public double distanceSquared(double x1, double y1, double z1)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Computes the distance between this WorldPoint and WorldPoint (x1, y1, z1).
      Parameters:
      x1 - the x coordinate of other WorldPoint
      y1 - the y coordinate of other WorldPoint
      z1 - the z coordinate of other WorldPoint
      Returns:
      the distance between this WorldPoint and WorldPoint (x1, y1, z1).
    • distanceSquared

      public double distanceSquared(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Computes the distance between this WorldPoint and the specified WorldPoint.
      Parameters:
      worldPoint - the other WorldPoint
      Returns:
      the distance between this WorldPoint and the specified WorldPoint.
      Throws:
      NullPointerException - if the specified WorldPoint is null
    • add

      public WorldPoint add(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add a WorldPoint to WorldPoint
      Parameters:
      worldPoint - WorldPoint to add
      Returns:
      This WorldPoint
    • add

      public WorldPoint add(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add x, y, z to WorldPoint
      Parameters:
      x - X amount to add
      y - Y amount to add
      z - Z amount to add
      Returns:
      This WorldPoint
    • subtract

      public WorldPoint subtract(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Subtract a WorldPoint to WorldPoint
      Parameters:
      worldPoint - WorldPoint to subtract
      Returns:
      This WorldPoint
    • subtract

      public WorldPoint subtract(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add x, y, z to WorldPoint
      Parameters:
      x - X amount to subtract
      y - Y amount to subtract
      z - Z amount to subtract
      Returns:
      This WorldPoint
    • multiply

      public WorldPoint multiply(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Multiply a WorldPoint by x, y, z
      Parameters:
      x - X amount to multiply
      y - Y amount to multiply
      z - Z amount to multiply
      Returns:
      This WorldPoint
    • multiply

      public WorldPoint multiply(double amount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Multiply a WorldPoint (x, y, z) by a double value
      Parameters:
      amount - The amount to multiply by
      Returns:
      This WorldPoint
    • multiply

      public WorldPoint multiply(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Multiply a WorldPoint by another WorldPoint. (Only affects x, y, z)
      Parameters:
      worldPoint - The WorldPoint to multiply by
      Returns:
      This WorldPoint
    • divide

      public WorldPoint divide(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Divide a WorldPoint by x, y, z
      Returns:
      This WorldPoint
    • divide

      public WorldPoint divide(double amount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Divide a WorldPoint (x, y, z) by a double value
      Parameters:
      amount - The amount to divide by
      Returns:
      This WorldPoint
    • divide

      public WorldPoint divide(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Divide a WorldPoint by another WorldPoint. (Only affects x, y, z)
      Parameters:
      worldPoint - The WorldPoint to divide by
      Returns:
      This WorldPoint
    • isBetween

      public boolean isBetween(WorldPoint min, WorldPoint max)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      min - Minimum WorldPoint
      max - Maximum WorldPoint
      Returns:
      A boolean
    • midpoint

      public WorldPoint midpoint(double x, double y, double z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a position which lies in the middle between this position and the specified coordinates.
      Parameters:
      x - the X coordinate of the second endpoint
      y - the Y coordinate of the second endpoint
      z - the Z coordinate of the second endpoint
      Returns:
      the position in the middle (new instance)
    • midpoint

      public WorldPoint midpoint(WorldPoint worldPoint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a WorldPoint which lies in the middle between this WorldPoint and the specified WorldPoint.
      Parameters:
      worldPoint - the other endpoint
      Returns:
      the WorldPoint in the middle (new instance)
      Throws:
      NullPointerException - if the specified WorldPoint is null
    • toVector

      public org.bukkit.util.Vector toVector()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A Vector
    • isChunkLoaded

      public boolean isChunkLoaded(org.bukkit.World world)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if the chunk is loaded in the world for this WorldPoint
      Parameters:
      world - World to use
      Returns:
      A boolean
    • zero

      public WorldPoint zero()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility method that will floor all values of this WorldPoint
      Returns:
      This WorldPoint
    • topCenter

      public WorldPoint topCenter()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility method that will set the coordinates to the top center of the WorldPoint
      Returns:
      This WorldPoint
    • bottomCenter

      public WorldPoint bottomCenter()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility method that will set the coordinates to the bottom center of the WorldPoint
      Returns:
      This WorldPoint
    • center

      public WorldPoint center()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility method that get the center of this WorldPoint on the x, y, z axis
      Returns:
      This WorldPoint
    • getBlockX

      public int getBlockX()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getBlockY

      public int getBlockY()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getBlockZ

      public int getBlockZ()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • clone

      public WorldPoint clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class Object