13
0
geforkt von Mirrors/Paper

SPIGOT-7872: Fix crash with event-modified teleports

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-08-17 08:40:13 +10:00
Ursprung 9f0a790b3d
Commit 7eb7761ca0

Datei anzeigen

@ -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();