Package de.sprax2013.betterchairs
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 the player leaves the chair
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bukkit.entity.ArmorStand
armorStand
protected org.bukkit.block.Block
block
protected org.bukkit.entity.Player
player
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
destroyOnNoPassenger()
Sometimes theEntityDismountEvent
is not fired for ArmorStands (e.g.@NotNull org.bukkit.entity.ArmorStand
getArmorStand()
@NotNull org.bukkit.block.Block
getBlock()
@NotNull org.bukkit.Location
getOriginPlayerLocation()
@NotNull org.bukkit.entity.Player
getPlayer()
@Nullable org.bukkit.Location
getPlayerLeavingLocation()
@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
-
-
-
Method Detail
-
isStair
@Deprecated public boolean 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()
-
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 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
-
-