geforkt von Mirrors/Paper
PreSpawnerSpawnEvent
This adds a separate event before an entity is spawned by a spawner which contains the location of the spawner too similarly to how the SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners.
Dieser Commit ist enthalten in:
Ursprung
8ea84d0962
Commit
b2cbea9e63
@ -47,10 +47,10 @@
|
|||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper start - PreCreatureSpawnEvent
|
+ // Paper start - PreCreatureSpawnEvent
|
||||||
+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent(
|
+ com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent event = new com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent(
|
||||||
+ io.papermc.paper.util.MCUtil.toLocation(world, d0, d1, d2),
|
+ io.papermc.paper.util.MCUtil.toLocation(world, d0, d1, d2),
|
||||||
+ org.bukkit.craftbukkit.entity.CraftEntityType.minecraftToBukkit(optional.get()),
|
+ org.bukkit.craftbukkit.entity.CraftEntityType.minecraftToBukkit(optional.get()),
|
||||||
+ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER
|
+ io.papermc.paper.util.MCUtil.toLocation(world, pos)
|
||||||
+ );
|
+ );
|
||||||
+ if (!event.callEvent()) {
|
+ if (!event.callEvent()) {
|
||||||
+ flag = true;
|
+ flag = true;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren