SPIGOT-4339: Add EntityTransformEvent

Thanks klugemonkey for some contributions in https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/351/overview

By: nathat890 <nathat890@outlook.com>
This commit is contained in:
CraftBukkit/Spigot
2018-11-14 14:10:22 +11:00
parent 04cffd8092
commit 6fd5f1379b
7 changed files with 119 additions and 34 deletions

View File

@@ -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
*/