接口的使用
org.bukkit.inventory.Inventory
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.参与操作玩家物品栏和物品交互的类.
与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
-
org.bukkit中Inventory的使用
修饰符和类型方法说明Bukkit.createInventory
(@Nullable InventoryHolder owner, int size) 创建一个类型为InventoryType.CHEST
, 有指定大小的空物品栏.Bukkit.createInventory
(@Nullable InventoryHolder owner, int size, @NotNull String title) 创建一个类型为InventoryType.CHEST
, 有指定大小和标题的空物品栏.Bukkit.createInventory
(@Nullable InventoryHolder owner, @NotNull InventoryType type) 以指定类型创建一个空物品栏.Bukkit.createInventory
(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) 以指定类型和标题创建一个空物品栏.Server.createInventory
(@Nullable InventoryHolder owner, int size) 创建一个类型为InventoryType.CHEST
, 有指定大小的空物品栏.Server.createInventory
(@Nullable InventoryHolder owner, int size, @NotNull String title) 创建一个类型为InventoryType.CHEST
, 有指定大小和标题的空物品栏.Server.createInventory
(@Nullable InventoryHolder owner, @NotNull InventoryType type) 以指定类型创建一个空物品栏.Server.createInventory
(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) 以指定类型和标题创建一个空物品栏. -
org.bukkit.block中Inventory的使用
修饰符和类型方法说明Chest.getBlockInventory()
返回箱子类型的物品栏.Container.getInventory()
获取此容器方块的物品栏.DoubleChest.getInventory()
Lectern.getInventory()
Container.getSnapshotInventory()
获取本容器的物品栏的快照.Lectern.getSnapshotInventory()
-
org.bukkit.entity中Inventory的使用
修饰符和类型方法说明HumanEntity.openInventory
(@NotNull Inventory inventory) 打开一个物品栏, 窗口顶部为你指定的物品栏, 底部为玩家物品栏(背包). -
org.bukkit.event.inventory中Inventory的使用
修饰符和类型方法说明InventoryClickEvent.getClickedInventory()
Gets the inventory corresponding to the clicked slot.InventoryMoveItemEvent.getDestination()
Gets the Inventory that the ItemStack is being put intoInventoryMoveItemEvent.getInitiator()
Gets the Inventory that initiated the transfer.HopperInventorySearchEvent.getInventory()
Gets theInventory
that the Hopper will use for its source/attached Container.InventoryEvent.getInventory()
获取此事件涉及的主要物品栏.InventoryPickupItemEvent.getInventory()
获取捡起这个物品的背包.InventoryMoveItemEvent.getSource()
Gets the Inventory that the ItemStack is being taken from修饰符和类型方法说明void
HopperInventorySearchEvent.setInventory
(@Nullable Inventory inventory) Set theInventory
that the Hopper will use for its source/attached Container.限定符构造器说明HopperInventorySearchEvent
(@NotNull Inventory inventory, @NotNull HopperInventorySearchEvent.ContainerType containerType, @NotNull Block hopper, @NotNull Block searchBlock) InventoryMoveItemEvent
(@NotNull Inventory sourceInventory, @NotNull ItemStack itemStack, @NotNull Inventory destinationInventory, boolean didSourceInitiate) InventoryPickupItemEvent
(@NotNull Inventory inventory, @NotNull Item item) -
org.bukkit.inventory中Inventory的使用
修饰符和类型接口说明interface
马(抽象概念的)(AbstractHorse
)的物品栏界面接口.interface
铁毡的背包界面接口interface
信标的背包界面接口interface
酿造台的用户界面接口.interface
Interface to the inventory of a Cartography table.interface
Interface to the inventory of a chiseled bookshelf.interface
Interface to the inventory of a Crafter.interface
合成台的用户界面接口.interface
Interface to the inventory of a DecoratedPot.interface
大箱子的用户界面接口.interface
附魔界面接口interface
熔炉用户界面接口interface
Interface to the inventory of a Grindstone.interface
马(抽象)的界面接口.interface
Interface to the inventory of a Jukebox.interface
Interface to the inventory of a Lectern.interface
羊驼的用户界面接口interface
Interface to the inventory of a Loom.interface
代表玩家和商人之间的用户界面接口.interface
玩家背包.interface
Interface to the inventory of a Smithing table.interface
Interface to the inventory of a Stonecutter.修饰符和类型方法说明InventoryView.getBottomInventory()
获取此窗口视图下方的物品栏 (通常是玩家背包).InventoryHolder.getInventory()
获取该对象的用户界面项目.InventoryView.getInventory
(int rawSlot) Gets the inventory corresponding to the given raw slot ID.DoubleChestInventory.getLeftSide()
获取这个大箱子的左半部分界面.DoubleChestInventory.getRightSide()
获取这个大箱子的右半部分界面InventoryView.getTopInventory()
获取此窗口视图上方的物品栏. -
org.bukkit.loot中Inventory的使用
修饰符和类型方法说明void
LootTable.fillInventory
(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context) Attempt to fill an inventory with this LootTable's loot.