接口的使用
org.bukkit.entity.Item
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
-
org.bukkit中Item的使用
修饰符和类型方法说明在指定的位置
丢出一个物品.World.dropItem
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
Note that functions will run before the entity is spawnedWorld.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item) 在指定的位置
丢出一个随机偏移的物品.World.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
with a random offset Note that functions will run before the entity is spawned修饰符和类型方法说明World.dropItem
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
Note that functions will run before the entity is spawnedWorld.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
with a random offset Note that functions will run before the entity is spawned -
org.bukkit.event.block中Item的使用
限定符构造器说明BlockDropItemEvent
(@NotNull Block block, @NotNull BlockState blockState, @NotNull Player player, @NotNull List<Item> items) -
org.bukkit.event.entity中Item的使用
修饰符和类型方法说明ItemDespawnEvent.getEntity()
ItemMergeEvent.getEntity()
ItemSpawnEvent.getEntity()
EntityPickupItemEvent.getItem()
获取实体捡起的掉落物.EntityDropItemEvent.getItemDrop()
Gets the Item created by the entityItemMergeEvent.getTarget()
获取主物品正在合并的物品实体.限定符构造器说明EntityDropItemEvent
(@NotNull Entity entity, @NotNull Item drop) EntityPickupItemEvent
(@NotNull LivingEntity entity, @NotNull Item item, int remaining) ItemDespawnEvent
(@NotNull Item despawnee, @NotNull Location loc) ItemMergeEvent
(@NotNull Item item, @NotNull Item target) ItemSpawnEvent
(@NotNull Item spawnee) ItemSpawnEvent
(@NotNull Item spawnee, Location loc) 已过时。 -
org.bukkit.event.inventory中Item的使用
-
org.bukkit.event.player中Item的使用
修饰符和类型方法说明PlayerPickupItemEvent.getItem()
已过时。获得此玩家在地面捡起的物品.PlayerDropItemEvent.getItemDrop()
获得此玩家丢出的物品.限定符构造器说明PlayerDropItemEvent
(@NotNull Player player, @NotNull Item drop) PlayerPickupArrowEvent
(@NotNull Player player, @NotNull Item item, @NotNull AbstractArrow arrow) PlayerPickupItemEvent
(@NotNull Player player, @NotNull Item item, int remaining) 已过时。