Actually call EntityTeleportEndGatewayEvent (#1147)

This commit is contained in:
Black Hole 2018-06-13 23:29:49 +02:00 committed by Zach
parent 8b371226fb
commit ea8801ce28

View File

@ -1,11 +1,11 @@
From de0b586bc05412392f63b9bb4b6f2ce7f3e77c97 Mon Sep 17 00:00:00 2001
From cafe8cdd7183733d0701896b1d1a560255fc2faa Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 9 Jun 2018 13:08:39 +0100
Date: Sat, 9 Jun 2018 14:08:39 +0200
Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
index ecbc48b0c..c84569612 100644
index ecbc48b0c..557f06017 100644
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
@@ -136,8 +136,19 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
@ -19,7 +19,7 @@ index ecbc48b0c..c84569612 100644
+ location.setYaw(bukkitEntity.getLocation().getYaw());
+
+ com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent event = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(MCUtil.toLocation(world, this.getPosition()).getBlock()));
+ if (event.isCancelled()) {
+ if (!event.callEvent()) {
+ return;
+ }
@ -30,5 +30,5 @@ index ecbc48b0c..c84569612 100644
this.h();
--
2.17.1
2.15.1.windows.2