2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockEnderPortal.java
|
|
|
|
+++ b/net/minecraft/server/BlockEnderPortal.java
|
2016-05-10 13:47:39 +02:00
|
|
|
@@ -4,6 +4,8 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
import java.util.Random;
|
2016-05-10 13:47:39 +02:00
|
|
|
import javax.annotation.Nullable;
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
+import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit
|
|
|
|
+
|
2016-02-29 22:32:46 +01:00
|
|
|
public class BlockEnderPortal extends BlockTileEntity {
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2016-02-29 22:32:46 +01:00
|
|
|
protected static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D);
|
2016-05-10 13:47:39 +02:00
|
|
|
@@ -37,6 +39,10 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
|
2017-09-18 12:00:00 +02:00
|
|
|
if (!world.isClientSide && !entity.isPassenger() && !entity.isVehicle() && entity.bf() && entity.getBoundingBox().c(iblockdata.e(world, blockposition).a(blockposition))) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start - Entity in portal
|
|
|
|
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
|
|
|
+ world.getServer().getPluginManager().callEvent(event);
|
|
|
|
+ // CraftBukkit end
|
2017-05-14 04:00:00 +02:00
|
|
|
entity.b(1);
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|