程序包 org.bukkit.block
接口 Lockable
- 所有已知子接口:
Beacon
,BrewingStand
,Chest
,Container
,Dispenser
,Dropper
,Furnace
,Hopper
,ShulkerBox
public interface Lockable
Represents a block (usually a container) that may be locked. When a lock is
active an item with a name corresponding to the key will be required to open
this block.
-
方法概要
-
方法详细资料
-
isLocked
boolean isLocked()Checks if the container has a valid (non empty) key.- 返回:
- true if the key is valid.
-
getLock
String getLock()Gets the key needed to access the container.- 返回:
- the key needed.
-
setLock
Sets the key required to access this container. Set to null (or empty string) to remove key.- 参数:
key
- the key required to access the container.
-