Class BukkitBlockAdapter

java.lang.Object
me.hsgamer.hscore.bukkit.block.BukkitBlockAdapter

public class BukkitBlockAdapter extends Object
The block adapter for Bukkit
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.util.Vector
    adapt(Position position)
    Adapt the position to vector
    static Position
    adapt(org.bukkit.block.Block block)
    Adapt the block to position.
    static Position
    adapt(org.bukkit.block.Block block, boolean normalize)
    Adapt the block to position
    static Position
    adapt(org.bukkit.Location location)
    Adapt the location to position.
    static Position
    adapt(org.bukkit.Location location, boolean normalize)
    Adapt the location to position
    static Position
    adapt(org.bukkit.util.Vector vector)
    Adapt the vector to position.
    static Position
    adapt(org.bukkit.util.Vector vector, boolean normalize)
    Adapt the vector to position
    static org.bukkit.Location
    adapt(org.bukkit.World world, Position position)
    Adapt the position to location
    static org.bukkit.block.Block
    adaptAsBlock(org.bukkit.World world, Position position)
    Adapt the position to block

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • adapt

      public static Position adapt(org.bukkit.util.Vector vector, boolean normalize)
      Adapt the vector to position
      Parameters:
      vector - the vector
      normalize - whether to normalize the position. If true, the position will be rounded to the nearest integer
      Returns:
      the position
    • adapt

      public static Position adapt(org.bukkit.util.Vector vector)
      Adapt the vector to position. The position will be rounded to the nearest integer.
      Parameters:
      vector - the vector
      Returns:
      the position
    • adapt

      public static Position adapt(org.bukkit.Location location, boolean normalize)
      Adapt the location to position
      Parameters:
      location - the location
      normalize - whether to normalize the position. If true, the position will be rounded to the nearest integer
      Returns:
      the position
    • adapt

      public static Position adapt(org.bukkit.Location location)
      Adapt the location to position. The position will be rounded to the nearest integer.
      Parameters:
      location - the location
      Returns:
      the position
    • adapt

      public static Position adapt(org.bukkit.block.Block block, boolean normalize)
      Adapt the block to position
      Parameters:
      block - the block
      normalize - whether to normalize the position. If true, the position will be rounded to the nearest integer
      Returns:
      the position
    • adapt

      public static Position adapt(org.bukkit.block.Block block)
      Adapt the block to position. The position will be rounded to the nearest integer.
      Parameters:
      block - the block
      Returns:
      the position
    • adapt

      public static org.bukkit.util.Vector adapt(Position position)
      Adapt the position to vector
      Parameters:
      position - the position
      Returns:
      the vector
    • adapt

      public static org.bukkit.Location adapt(org.bukkit.World world, Position position)
      Adapt the position to location
      Parameters:
      world - the world
      position - the position
      Returns:
      the location
    • adaptAsBlock

      public static org.bukkit.block.Block adaptAsBlock(org.bukkit.World world, Position position)
      Adapt the position to block
      Parameters:
      world - the world
      position - the position
      Returns:
      the block