Class ChairUtils

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

      • applyChairProtections

        public static void applyChairProtections​(org.bukkit.entity.ArmorStand armorStand)
        • ArmorStand.hasGravity() = false
        • ArmorStand.isVisible() = false
        • LivingEntity.getRemoveWhenFarAway() = true
        • Invulnerable = true
        • DisabledSlots = 0b11111 (all)
        armorStand - The ArmorStand to apply the protection to
      • getBlockRotationLegacy

        public static org.bukkit.block.BlockFace getBlockRotationLegacy​(org.bukkit.block.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
      • applyRegeneration

        public static void applyRegeneration​(org.bukkit.entity.HumanEntity p,
                                             int regenerationAmplifier)