程序包 org.bukkit.block
接口 Vault
- 所有超级接口:
BlockState
,Metadatable
,PersistentDataHolder
,TileState
Represents a captured state of a vault.
-
方法概要
修饰符和类型方法说明double
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.Gets the players who have already received rewards from this vault.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
Sets theLootTable
this vault will display items from.void
setKeyItem
(@NotNull ItemStack keyItem) Sets theItemStack
players must use to unlock this vault.void
setLootTable
(@NotNull LootTable table) Sets theLootTable
this vault will pick rewards from.从接口继承的方法 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
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
从接口继承的方法 org.bukkit.block.TileState
getPersistentDataContainer
-
方法详细资料
-
getActivationRange
double getActivationRange()Gets the distance at which a player must enter for this vault to activate.- 返回:
- 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.- 参数:
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.- 返回:
- 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.- 参数:
range
- the distance at which a player must exit for this vault to deactivate.
-
getLootTable
Gets theLootTable
this vault will pick rewards from.- 返回:
- the loot table
-
setLootTable
Sets theLootTable
this vault will pick rewards from.- 参数:
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.- 返回:
- 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.- 参数:
table
- the loot table to display items from
-
getKeyItem
Gets theItemStack
players must use to unlock this vault.- 返回:
- the key item
-
setKeyItem
Sets theItemStack
players must use to unlock this vault.- 参数:
keyItem
- the key item
-
getRewardedPlayers
Gets the players who have already received rewards from this vault.- 返回:
- unmodifiable set of player UUIDs
- 抛出:
IllegalStateException
- if this block state is not placed
-