Class ChairUtils

java.lang.Object
de.sprax2013.betterchairs.ChairUtils

public class ChairUtils extends Object
This class provides utility methods intended to be used by BetterChairs's nms-classes
  • Method Details

    • applyChairProtections

      public static void applyChairProtections(Entity entity)
      Examples for protections that could be applied:
      Parameters:
      entity - The Entity to apply the protection to
    • getBlockRotationLegacy

      public static BlockFace getBlockRotationLegacy(Block b)
      This method checks Directional.getFacing() (legacy API in the current Bukkit api) and inverts it to show the Block's rotation. If the block is not facing to NORTH, SOUTH, EAST or WEST, the value is returned without inverting it
      Parameters:
      b - The block to check
      Returns:
      The inverted BlockFace as described above, or BlockFace.SELF if the Bukkit-api is too old
    • didChairEntityMove

      public static boolean didChairEntityMove(Location expected, double actualX, double actualY, double actualZ)
    • applyRegeneration

      public static void applyRegeneration(HumanEntity p, int regenerationAmplifier)
    • getSitOffset

      public static double getSitOffset(Block block, boolean sitsOnArmorStand, ChairNMS chairNMS)