diff options
author | nathat890 <nathat890@outlook.com> | 2018-11-14 14:10:22 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-11-14 14:10:22 +1100 |
commit | d2c422f13e5226a81b7fe3f8355922beed2a9cfc (patch) | |
tree | 30818363607320b8a215b541292364dcc03932b8 /src/main/java/org | |
parent | 17ff1e04679d5826f7d574fecc1a97820d5579d1 (diff) | |
download | craftbukkit-d2c422f13e5226a81b7fe3f8355922beed2a9cfc.tar craftbukkit-d2c422f13e5226a81b7fe3f8355922beed2a9cfc.tar.gz craftbukkit-d2c422f13e5226a81b7fe3f8355922beed2a9cfc.tar.lz craftbukkit-d2c422f13e5226a81b7fe3f8355922beed2a9cfc.tar.xz craftbukkit-d2c422f13e5226a81b7fe3f8355922beed2a9cfc.zip |
SPIGOT-4339: Add EntityTransformEvent
Thanks klugemonkey for some contributions in https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/351/overview
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -301,6 +301,16 @@ public class CraftEventFactory { } /** + * 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 */ public static EntityShootBowEvent callEntityShootBowEvent(EntityLiving who, ItemStack itemstack, EntityArrow entityArrow, float force) { |