接口的使用
org.bukkit.inventory.InventoryView
使用InventoryView的程序包
-
org.bukkit.entity中InventoryView的使用
修饰符和类型方法说明HumanEntity.getOpenInventory()获取玩家正在查看的物品栏.HumanEntity.openEnchanting(@Nullable Location location, boolean force) 打开一个空白附魔台物品栏界面, 玩家物品栏(背包)在底部.HumanEntity.openInventory(@NotNull Inventory inventory) 打开一个物品栏, 窗口顶部为你指定的物品栏, 底部为玩家物品栏(背包).HumanEntity.openMerchant(@NotNull Villager trader, boolean force) 与某村民开始交易.HumanEntity.openMerchant(@NotNull Merchant merchant, boolean force) 与某商人开始交易.HumanEntity.openWorkbench(@Nullable Location location, boolean force) 打开一个空白工作台物品栏界面, 玩家物品栏(背包)在底部.参数类型为InventoryView的org.bukkit.entity中的方法 -
org.bukkit.event.enchantment中InventoryView的使用
参数类型为InventoryView的org.bukkit.event.enchantment中的构造器限定符构造器说明EnchantItemEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment, Integer> enchants, @NotNull Enchantment enchantmentHint, int levelHint, int i) PrepareItemEnchantEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, @NotNull EnchantmentOffer[] offers, int bonus) -
org.bukkit.event.inventory中InventoryView的使用
参数类型为InventoryView的org.bukkit.event.inventory中的构造器限定符构造器说明CraftItemEvent(@NotNull Recipe recipe, @NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) CraftItemEvent(@NotNull Recipe recipe, @NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) InventoryClickEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) InventoryClickEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) InventoryCloseEvent(@NotNull InventoryView transaction) InventoryCreativeEvent(@NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ItemStack newItem) InventoryDragEvent(@NotNull InventoryView what, @Nullable ItemStack newCursor, @NotNull ItemStack oldCursor, boolean right, @NotNull Map<Integer, ItemStack> slots) InventoryEvent(@NotNull InventoryView transaction) InventoryInteractEvent(@NotNull InventoryView transaction) InventoryOpenEvent(@NotNull InventoryView transaction) PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) PrepareGrindstoneEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) PrepareInventoryResultEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) PrepareItemCraftEvent(@NotNull CraftingInventory what, @NotNull InventoryView view, boolean isRepair) PrepareSmithingEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) SmithItemEvent(@NotNull InventoryView view, InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) SmithItemEvent(@NotNull InventoryView view, InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) TradeSelectEvent(@NotNull InventoryView transaction, int newIndex)