Package org.bukkit.block
Interface Vault
- All Superinterfaces:
BlockState
,Metadatable
,PersistentDataHolder
,TileState
Represents a captured state of a vault.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the distance at which a player must enter for this vault to activate.double
Gets the distance at which a player must exit for the vault to deactivate.Gets theLootTable
this vault will display items from.Gets theItemStack
players must use to unlock this vault.Gets theLootTable
this vault will pick rewards from.void
setActivationRange
(double range) Sets the distance at which a player must enter for this vault to activate.void
setDeactivationRange
(double range) Sets the distance at which a player must exit for this vault to deactivate.void
setDisplayLootTable
(LootTable table) Sets theLootTable
this vault will display items from.void
setKeyItem
(ItemStack keyItem) Sets theItemStack
players must use to unlock this vault.void
setLootTable
(LootTable table) Sets theLootTable
this vault will pick rewards from.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
-
getActivationRange
double getActivationRange()Gets the distance at which a player must enter for this vault to activate.- Returns:
- the distance at which a player must enter for this vault to activate.
-
setActivationRange
void setActivationRange(double range) Sets the distance at which a player must enter for this vault to activate.- Parameters:
range
- the distance at which a player must enter for this vault to activate.
-
getDeactivationRange
double getDeactivationRange()Gets the distance at which a player must exit for the vault to deactivate.- Returns:
- the distance at which a player must exit for the vault to deactivate.
-
setDeactivationRange
void setDeactivationRange(double range) Sets the distance at which a player must exit for this vault to deactivate.- Parameters:
range
- the distance at which a player must exit for this vault to deactivate.
-
getLootTable
Gets theLootTable
this vault will pick rewards from.- Returns:
- the loot table
-
setLootTable
Sets theLootTable
this vault will pick rewards from.- Parameters:
table
- the loot table
-
getDisplayLootTable
Gets theLootTable
this vault will display items from.
If this value is null the regular loot table will be used to display items.- Returns:
- the loot table to display items from
-
setDisplayLootTable
Sets theLootTable
this vault will display items from.
If this value is set to null the regular loot table will be used to display items.- Parameters:
table
- the loot table to display items from
-
getKeyItem
Gets theItemStack
players must use to unlock this vault.- Returns:
- the key item
-
setKeyItem
Sets theItemStack
players must use to unlock this vault.- Parameters:
keyItem
- the key item
-