程序包 org.bukkit.block

接口 Shelf

所有超级接口:
BlockInventoryHolder, BlockState, InventoryHolder, Metadatable, PersistentDataHolder, TileState

public interface Shelf extends TileState, BlockInventoryHolder
表示书架的捕获状态。
  • 方法详细资料

    • getInventory

      从接口复制的说明: InventoryHolder
      获取该对象的用户界面项目.

      原文:Get the object's inventory.

      指定者:
      getInventory 在接口中 InventoryHolder
      返回:
      物品栏
      另请参阅:
    • getSnapshotInventory

      @NotNull @NotNull ShelfInventory getSnapshotInventory()
      返回:
      快照物品栏
      另请参阅:
    • getSlot

      int getSlot(@NotNull @NotNull Vector position)
      根据相对于此方块的向量获取对应的槽位。
      如果给定的向量不在任何槽位的范围内,则返回 -1。

      提供的向量应仅包含值在 0.0 到 1.0 之间(含)的分量。

      参数:
      position - 相对于此方块的向量
      返回:
      给定向量下的槽位,或 -1

      原文:Gets the appropriate slot based on a vector relative to this block.
      Will return -1 if the given vector is not within the bounds of any slot.

      The supplied vector should only contain components with values between 0.0 and 1.0, inclusive.