Java 类org.bukkit.block.ContainerBlock 实例源码

项目:simple-survival-games    文件:ArenaContainer.java   
/**
 * Get the current container
 * @return the container
 */
public ContainerBlock getContainerBlock() {
    // Get the container block, the block may not be null
    Block b = getBlock();
    if(b == null)
        return null;

    // Convert the block to a control and return
    if(b.getState() instanceof ContainerBlock)
        return (ContainerBlock) b.getState();
    return null;
}