Class Chair

java.lang.Object
de.sprax2013.betterchairs.Chair

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

    • block

      protected final Block block
    • chairEntity

      protected final Entity chairEntity
    • player

      protected final Player player
  • Method Details

    • 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

      @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 Location getOriginPlayerLocation()
    • getBlock

      @NotNull public @NotNull Block getBlock()
    • getChairEntity

      @NotNull public @NotNull Entity getChairEntity()
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
    • getPlayerLeavingLocation

      @NotNull public @NotNull 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