Package de.sprax2013.betterchairs
Class Chair
java.lang.Object
de.sprax2013.betterchairs.Chair
Holds a spawned chair
Instances of this class get disposed as soon the player leaves the chair
Instances of this class get disposed as soon the player leaves the chair
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Sometimes theEntityDismountEvent
is not fired for ArmorStands (e.g.@NotNull Block
getBlock()
@NotNull Entity
@NotNull Location
@NotNull Player
@NotNull Location
@NotNull ChairType
getType()
This method checks if it is a stair or slab block.boolean
isStair()
Deprecated.Since v1.1.0 Chairs may be any block and not just stairs and slabs
-
Field Details
-
block
-
chairEntity
-
player
-
-
Method Details
-
isStair
Deprecated.Since v1.1.0 Chairs may be any block and not just stairs and slabsThis 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
This method checks if it is a stair or slab block.- Returns:
- true if the chair's block is a stair, false otherwise
-
getOriginPlayerLocation
-
getBlock
-
getChairEntity
-
getPlayer
-
getPlayerLeavingLocation
-
destroyOnNoPassenger
protected boolean destroyOnNoPassenger()Sometimes theEntityDismountEvent
is not fired for ArmorStands (e.g. Fallback NMS)
This will check for passengers and destroy theChair
if there is none- Returns:
- true if the chair is being destroyed, false otherwise
-