Package org.bukkit.block.data.type
Interface ChiseledBookshelf
- All Superinterfaces:
BlockData
,Cloneable
,Directional
Interface to the 'slot_0_occupied', 'slow_1_occupied' ... 'slot_5_occupied'
flags on a bookshelf which indicate which slots are occupied rendered on the
outside.
Block may have 0, 1...
Block may have 0, 1...
getMaximumOccupiedSlots()
-1 occupied slots.-
Method Summary
Modifier and TypeMethodDescriptionint
Get the maximum amount of slots on this block.Get the indexes of all the occupied slots present on this block.boolean
isSlotOccupied
(int slot) Checks if the following slot is occupied.void
setSlotOccupied
(int slot, boolean occupied) Sets whether the following slot is occupied.Methods inherited from interface org.bukkit.block.data.BlockData
clone, copyTo, createBlockState, getAsString, getAsString, getLightEmission, getMapColor, getMaterial, getPistonMoveReaction, getPlacementMaterial, getSoundGroup, isFaceSturdy, isOccluding, isPreferredTool, isSupported, isSupported, matches, merge, mirror, requiresCorrectToolForDrops, rotate
Methods inherited from interface org.bukkit.block.data.Directional
getFaces, getFacing, setFacing
-
Method Details
-
isSlotOccupied
boolean isSlotOccupied(int slot) Checks if the following slot is occupied.- Parameters:
slot
- to check- Returns:
- if slot is occupied
-
setSlotOccupied
void setSlotOccupied(int slot, boolean occupied) Sets whether the following slot is occupied.- Parameters:
slot
- to setoccupied
- book
-
getOccupiedSlots
Get the indexes of all the occupied slots present on this block.- Returns:
- set of all occupied slots
-
getMaximumOccupiedSlots
int getMaximumOccupiedSlots()Get the maximum amount of slots on this block.- Returns:
- maximum occupied slots count
-