diff options
author | EdGruberman <ed@rjump.com> | 2012-12-22 11:46:24 -0700 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-19 06:20:33 -0600 |
commit | d834ca4c6c6dd051e49ee177eb527c7494bd47bc (patch) | |
tree | 858188f8ab16717870890dbf2a3d3e7695526731 /src/main/java/net/minecraft/server/BlockEnderPortal.java | |
parent | 9cb320654de9b90b4ee2f39e5909afac49ce044c (diff) | |
download | craftbukkit-d834ca4c6c6dd051e49ee177eb527c7494bd47bc.tar craftbukkit-d834ca4c6c6dd051e49ee177eb527c7494bd47bc.tar.gz craftbukkit-d834ca4c6c6dd051e49ee177eb527c7494bd47bc.tar.lz craftbukkit-d834ca4c6c6dd051e49ee177eb527c7494bd47bc.tar.xz craftbukkit-d834ca4c6c6dd051e49ee177eb527c7494bd47bc.zip |
[Bleeding] Add experimental support for entity portal traveling
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockEnderPortal.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockEnderPortal.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/BlockEnderPortal.java b/src/main/java/net/minecraft/server/BlockEnderPortal.java index d55e41d0..6a5b2748 100644 --- a/src/main/java/net/minecraft/server/BlockEnderPortal.java +++ b/src/main/java/net/minecraft/server/BlockEnderPortal.java @@ -3,6 +3,8 @@ package net.minecraft.server; import java.util.List; import java.util.Random; +import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit + public class BlockEnderPortal extends BlockContainer { public static boolean a = false; @@ -38,6 +40,10 @@ public class BlockEnderPortal extends BlockContainer { public void a(World world, int i, int j, int k, Entity entity) { if (entity.vehicle == null && entity.passenger == null && !world.isStatic) { + // CraftBukkit start - Entity in portal + EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k)); + world.getServer().getPluginManager().callEvent(event); + // CraftBukkit end entity.b(1); } } |