Package de.sprax2013.betterchairs
Class ChairUtils
java.lang.Object
de.sprax2013.betterchairs.ChairUtils
This class provides utility methods intended to be used by BetterChairs's nms-classes
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyChairProtections(Entity entity) Examples for protections that could be applied:ArmorStand.hasGravity()=falseArmorStand.isVisible()=falseLivingEntity.getRemoveWhenFarAway()=trueProjectile.doesBounce()=falseInvulnerable =trueNoGravity =trueSilent =1DisabledSlots =0b11111(all)static voidapplyRegeneration(HumanEntity p, int regenerationAmplifier) static booleandidChairEntityMove(Location expected, double actualX, double actualY, double actualZ) static BlockFaceThis method checksDirectional.getFacing()(legacy API in the current Bukkit api) and inverts it to show the Block's rotation.static doublegetSitOffset(Block block, boolean sitsOnArmorStand, ChairNMS chairNMS)
-
Method Details
-
applyChairProtections
Examples for protections that could be applied:ArmorStand.hasGravity()=falseArmorStand.isVisible()=falseLivingEntity.getRemoveWhenFarAway()=trueProjectile.doesBounce()=false- Invulnerable =
true - NoGravity =
true - Silent =
1 - DisabledSlots =
0b11111(all)
- Parameters:
entity- The Entity to apply the protection to
-
getBlockRotationLegacy
This method checksDirectional.getFacing()(legacy API in the current Bukkit api) and inverts it to show the Block's rotation. If the block is not facing toNORTH,SOUTH,EASTorWEST, the value is returned without inverting it- Parameters:
b- The block to check- Returns:
- The inverted BlockFace as described above, or
BlockFace.SELFif the Bukkit-api is too old
-
didChairEntityMove
public static boolean didChairEntityMove(Location expected, double actualX, double actualY, double actualZ) -
applyRegeneration
-
getSitOffset
-