Class 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:
      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
      b - The block to check
      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)