Package org.bukkit.block
Interface Campfire
- All Superinterfaces:
BlockState
,Metadatable
,PersistentDataHolder
,TileState
Represents a captured state of a campfire.
-
Method Summary
Modifier and TypeMethodDescriptionint
getCookTime
(int index) Get cook time.int
getCookTimeTotal
(int index) Get cook time total.getItem
(int index) int
getSize()
boolean
isCookingDisabled
(int index) State of slot index.void
setCookTime
(int index, int cookTime) Set cook time.void
setCookTimeTotal
(int index, int cookTimeTotal) Set cook time.void
void
Re-enable cooking in all slots.boolean
startCooking
(int index) Re-enable cooking in the specified slot index.void
Disable cooking in all slots.boolean
stopCooking
(int index) Disable cooking in the specified slot index.Methods inherited from interface org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, 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, isSnapshot
-
Method Details
-
getSize
int getSize()- Returns:
- The size of the inventory
- See Also:
-
getItem
- Parameters:
index
- The index of the Slot's ItemStack to return- Returns:
- The ItemStack in the slot
- See Also:
-
setItem
- Parameters:
index
- The index where to put the ItemStackitem
- The ItemStack to set- See Also:
-
getCookTime
int getCookTime(int index) Get cook time. This is the amount of time the item has been cooking for.- Parameters:
index
- item slot index- Returns:
- Cook time
-
setCookTime
void setCookTime(int index, int cookTime) Set cook time. This is the amount of time the item has been cooking for.- Parameters:
index
- item slot indexcookTime
- Cook time
-
getCookTimeTotal
int getCookTimeTotal(int index) Get cook time total. This is the amount of time the item is required to cook for.- Parameters:
index
- item slot index- Returns:
- Cook time total
-
setCookTimeTotal
void setCookTimeTotal(int index, int cookTimeTotal) Set cook time. This is the amount of time the item is required to cook for.- Parameters:
index
- item slot indexcookTimeTotal
- Cook time total
-
stopCooking
void stopCooking()Disable cooking in all slots. -
startCooking
void startCooking()Re-enable cooking in all slots. -
stopCooking
boolean stopCooking(int index) Disable cooking in the specified slot index.- Parameters:
index
- item slot index- Returns:
- whether the slot had cooking enabled before this call
-
startCooking
boolean startCooking(int index) Re-enable cooking in the specified slot index.- Parameters:
index
- item slot index- Returns:
- whether the slot couldn't cook before this call
-
isCookingDisabled
boolean isCookingDisabled(int index) State of slot index.- Parameters:
index
- item slot index- Returns:
true
if the specified slot index cannot cook
-