Class Chair


  • public class Chair
    extends Object
    Holds a spawned chair
    Instances of this class get disposed as soon the the player leaves the chair
    • Field Detail

      • block

        protected final org.bukkit.block.Block block
      • armorStand

        protected final org.bukkit.entity.ArmorStand armorStand
      • player

        protected final org.bukkit.entity.Player player
    • Method Detail

      • isStair

        @Deprecated
        public boolean isStair()
        Deprecated.
        Since v1.1.0 Chairs may be any block and not just stairs and slabs
        This method checks if it is a stair block.
        Currently only Stairs and Slabs may be used for chairs.
        Returns:
        true if the chair's block is a stair, false otherwise
        See Also:
        getType()
      • getType

        @NotNull
        public @NotNull ChairType getType()
        This method checks if it is a stair or slab block.
        Returns:
        true if the chair's block is a stair, false otherwise
      • getOriginPlayerLocation

        @NotNull
        public @NotNull org.bukkit.Location getOriginPlayerLocation()
      • getBlock

        @NotNull
        public @NotNull org.bukkit.block.Block getBlock()
      • getArmorStand

        @NotNull
        public @NotNull org.bukkit.entity.ArmorStand getArmorStand()
      • getPlayer

        @NotNull
        public @NotNull org.bukkit.entity.Player getPlayer()
      • getPlayerLeavingLocation

        @Nullable
        public @Nullable org.bukkit.Location getPlayerLeavingLocation()
      • destroyOnNoPassenger

        protected boolean destroyOnNoPassenger()
        Sometimes the EntityDismountEvent is not fired for ArmorStands (e.g. Fallback NMS)
        This will check for passengers and destroy the Chair if there is none
        Returns:
        true if the chair is being destroyed, false otherwise