Actually call EntityTeleportEndGatewayEvent (#1147)

This commit is contained in:
Black Hole 2018-06-13 23:29:49 +02:00
parent b77a601ae0
commit c0a2597976

View file

@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ 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;
+ }