mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 12:05:59 +03:00
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockEndPortal.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockEndPortal.java
|
|
@@ -3,6 +3,9 @@
|
|
import java.util.List;
|
|
import java.util.Random;
|
|
import javax.annotation.Nullable;
|
|
+
|
|
+import org.bukkit.event.entity.EntityPortalEnterEvent;
|
|
+
|
|
import net.minecraft.block.material.MapColor;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.block.state.IBlockState;
|
|
@@ -68,6 +71,10 @@
|
|
{
|
|
if (!entityIn.isRiding() && !entityIn.isBeingRidden() && entityIn.isNonBoss() && !worldIn.isRemote && entityIn.getEntityBoundingBox().intersectsWith(state.getBoundingBox(worldIn, pos).offset(pos)))
|
|
{
|
|
+ // CraftBukkit start - Entity in portal
|
|
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entityIn.getBukkitEntity(), new org.bukkit.Location(worldIn.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
|
+ worldIn.getServer().getPluginManager().callEvent(event);
|
|
+ // CraftBukkit end
|
|
entityIn.changeDimension(1);
|
|
}
|
|
}
|