Class Locations

java.lang.Object
net.apartium.cocoabeans.spigot.Locations

public class Locations extends Object
Bukkit locations systems helper methods
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<org.bukkit.Location>
    getLocationsBetween(org.bukkit.Location pos1, org.bukkit.Location pos2)
    Get all the locations between two positions
    static boolean
    isSameWorld(org.bukkit.Location loc1, org.bukkit.Location loc2)
    Checking if the locations is in the same world
    static org.bukkit.Location
    toLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Position position)
    Convert a position to a location
    static org.bukkit.Location
    toLocation(org.bukkit.World world, net.apartium.cocoabeans.space.Transform transform)
    Convert a transform to a location
    static net.apartium.cocoabeans.space.Position
    toPosition(org.bukkit.Location location)
    Convert a location to a position
    static net.apartium.cocoabeans.space.Rotation
    toRotation(org.bukkit.Location location)
    Convert a location to rotation
    static net.apartium.cocoabeans.space.Transform
    toTransform(org.bukkit.Location location)
    Convert a location to rotation
    static org.bukkit.util.Vector
    toVector(net.apartium.cocoabeans.space.Position position)
    Convert a position to a vector
    static org.bukkit.util.Vector
    toVector(net.apartium.cocoabeans.space.Transform transform)
    Convert a transform to a vector

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 location
      loc2 - 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 position
      pos2 - 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 world
      position - 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 world
      transform - 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