mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-04-13 09:41:09 +00:00
#1034: Add TrialSpawnerSpawnEvent
This commit is contained in:
parent
23cffd9cff
commit
69ebd9fd05
1 changed files with 26 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
||||||
|
package org.bukkit.event.entity;
|
||||||
|
|
||||||
|
import org.bukkit.block.TrialSpawner;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when an entity is spawned into a world by a trial spawner.
|
||||||
|
* <p>
|
||||||
|
* If a Trial Spawner Spawn event is cancelled, the entity will not spawn.
|
||||||
|
*/
|
||||||
|
@ApiStatus.Experimental
|
||||||
|
public class TrialSpawnerSpawnEvent extends EntitySpawnEvent {
|
||||||
|
private final TrialSpawner spawner;
|
||||||
|
|
||||||
|
public TrialSpawnerSpawnEvent(@NotNull final Entity spawnee, @NotNull final TrialSpawner spawner) {
|
||||||
|
super(spawnee);
|
||||||
|
this.spawner = spawner;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public TrialSpawner getTrialSpawner() {
|
||||||
|
return spawner;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue