From 7548afcf2470885065171982aa1c813196e98b09 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 17 Aug 2024 08:40:13 +1000 Subject: [PATCH] SPIGOT-7872: Fix crash with event-modified teleports --- nms-patches/net/minecraft/server/network/PlayerConnection.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/server/network/PlayerConnection.patch b/nms-patches/net/minecraft/server/network/PlayerConnection.patch index 2623741b1..ef370f58f 100644 --- a/nms-patches/net/minecraft/server/network/PlayerConnection.patch +++ b/nms-patches/net/minecraft/server/network/PlayerConnection.patch @@ -573,7 +573,7 @@ + this.cserver.getPluginManager().callEvent(event); + + if (event.isCancelled() || !to.equals(event.getTo())) { -+ set.clear(); // Can't relative teleport ++ set = Collections.emptySet(); // Can't relative teleport + to = event.isCancelled() ? event.getFrom() : event.getTo(); + d0 = to.getX(); + d1 = to.getY();