Package | Description |
---|---|
org.bukkit |
The root package of the Bukkit API, contains generalized API classes.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Item |
World.dropItem(@NotNull Location location,
@NotNull ItemStack item,
@Nullable Consumer<Item> function)
Drops an item at the specified
Location
Note that functions will run before the entity is spawned |
@NotNull Item |
World.dropItemNaturally(@NotNull Location location,
@NotNull ItemStack item,
@Nullable Consumer<Item> function)
Drops an item at the specified
Location with a random offset
Note that functions will run before the entity is spawned |
default <T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
@Nullable Consumer<T> function)
Spawn an entity of a specific class at the given
Location , with
the supplied function run before the entity is added to the world. |
<T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
@Nullable Consumer<T> function,
CreatureSpawnEvent.SpawnReason reason) |
default <T extends Entity> |
World.spawn(@NotNull Location location,
@NotNull Class<T> clazz,
CreatureSpawnEvent.SpawnReason reason,
@Nullable Consumer<T> function) |
default @NotNull Entity |
World.spawnEntity(@NotNull Location loc,
@NotNull EntityType type,
CreatureSpawnEvent.SpawnReason reason,
@Nullable Consumer<Entity> function) |
Copyright © 2021. All rights reserved.