Commits
md_5 authored 9a1f5ee80a8
5 5 | import javax.annotation.Nullable; |
6 6 | |
7 7 | +import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit |
8 8 | + |
9 9 | public class BlockEnderPortal extends BlockTileEntity { |
10 10 | |
11 11 | protected static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D); |
12 12 | |
13 13 | |
14 14 | public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) { |
15 - | if (!entity.isPassenger() && !entity.isVehicle() && entity.bf() && !world.isClientSide && entity.getBoundingBox().c(iblockdata.e(world, blockposition).a(blockposition))) { |
15 + | if (!world.isClientSide && !entity.isPassenger() && !entity.isVehicle() && entity.bf() && entity.getBoundingBox().c(iblockdata.e(world, blockposition).a(blockposition))) { |
16 16 | + // CraftBukkit start - Entity in portal |
17 17 | + EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ())); |
18 18 | + world.getServer().getPluginManager().callEvent(event); |
19 19 | + // CraftBukkit end |
20 20 | entity.b(1); |
21 21 | } |
22 22 |