From d2c422f13e5226a81b7fe3f8355922beed2a9cfc Mon Sep 17 00:00:00 2001 From: nathat890 Date: Wed, 14 Nov 2018 14:10:22 +1100 Subject: SPIGOT-4339: Add EntityTransformEvent Thanks klugemonkey for some contributions in https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/351/overview --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 328322c1..aca32147 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -300,6 +300,16 @@ public class CraftEventFactory { return event; } + /** + * EntityTransformEvent + */ + public static EntityTransformEvent callEntityTransformEvent(EntityLiving original, EntityLiving converted, EntityTransformEvent.TransformReason convertType) { + EntityTransformEvent event = new EntityTransformEvent(original.getBukkitEntity(), converted.getBukkitEntity(), convertType); + Bukkit.getPluginManager().callEvent(event); + + return event; + } + /** * EntityShootBowEvent */ -- cgit v1.2.3