mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
Use alternate constructor for EndGateway - Fixes #563
This commit is contained in:
parent
7a1b393715
commit
bd7c76a1cf
@ -1,4 +1,4 @@
|
|||||||
From f0cd98d910ddefaf78ab4dcb659a7319cda9e995 Mon Sep 17 00:00:00 2001
|
From 0150fcf323ed48b95594a792965d7c161780f04e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 31 Dec 2016 21:44:50 -0500
|
Date: Sat, 31 Dec 2016 21:44:50 -0500
|
||||||
Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
|||||||
Allows you to access the Gateway being used in a teleport event
|
Allows you to access the Gateway being used in a teleport event
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||||
index 065d0bbfc..678d4dedb 100644
|
index 065d0bbfc..ea8992d72 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||||
@@ -124,7 +124,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
@@ -124,7 +124,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||||
@ -14,7 +14,7 @@ index 065d0bbfc..678d4dedb 100644
|
|||||||
location.setYaw(player.getLocation().getYaw());
|
location.setYaw(player.getLocation().getYaw());
|
||||||
|
|
||||||
- PlayerTeleportEvent teleEvent = new PlayerTeleportEvent(player, player.getLocation(), location, PlayerTeleportEvent.TeleportCause.END_GATEWAY);
|
- PlayerTeleportEvent teleEvent = new PlayerTeleportEvent(player, player.getLocation(), location, PlayerTeleportEvent.TeleportCause.END_GATEWAY);
|
||||||
+ PlayerTeleportEvent teleEvent = new com.destroystokyo.paper.event.player.PlayerTeleportEndGatewayEvent(player, player.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(org.bukkit.Material.END_GATEWAY, this)); // Paper
|
+ PlayerTeleportEvent teleEvent = new com.destroystokyo.paper.event.player.PlayerTeleportEndGatewayEvent(player, player.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(MCUtil.toLocation(world, this.getPosition()).getBlock())); // Paper
|
||||||
Bukkit.getPluginManager().callEvent(teleEvent);
|
Bukkit.getPluginManager().callEvent(teleEvent);
|
||||||
if (teleEvent.isCancelled()) {
|
if (teleEvent.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user