Package org.bukkit.block
Interface Shelf
- All Superinterfaces:
BlockInventoryHolder
,BlockState
,InventoryHolder
,Metadatable
,PersistentDataHolder
,TileState
Represents a captured state of a shelf.
-
Method Summary
Modifier and TypeMethodDescriptionGet the object's inventory.int
Gets the appropriate slot based on a vector relative to this block.
Will return -1 if the given vector is not within the bounds of any slot.Methods inherited from interface org.bukkit.inventory.BlockInventoryHolder
getBlock
Methods inherited from interface org.bukkit.block.BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer
-
Method Details
-
getInventory
Description copied from interface:InventoryHolder
Get the object's inventory.- Specified by:
getInventory
in interfaceInventoryHolder
- Returns:
- inventory
- See Also:
-
getSnapshotInventory
- Returns:
- snapshot inventory
- See Also:
-
getSlot
Gets the appropriate slot based on a vector relative to this block.
Will return -1 if the given vector is not within the bounds of any slot.The supplied vector should only contain components with values between 0.0 and 1.0, inclusive.
- Parameters:
position
- a vector relative to this block- Returns:
- the slot under the given vector or -1
-