Uses of Interface
org.bukkit.util.Consumer
Package
Description
The root package of the Bukkit API, contains generalized API classes.
-
Uses of Consumer in org.bukkit
Modifier and TypeMethodDescriptionWorld.dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<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<Item> function)
Drops an item at the specifiedLocation
with a random offset Note that functions will run before the entity is spawneddefault <T extends Entity>
TSpawn an entity of a specific class at the givenLocation
, with the supplied function run before the entity is added to the world.<T extends Entity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function, CreatureSpawnEvent.SpawnReason reason)
default <T extends Entity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<T> function)
World.spawnEntity(@NotNull Location loc, @NotNull EntityType type, CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<Entity> function)