mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 06:20:29 +08:00
SPIGOT-1788: Correctly teleport the player back to their old location
This commit is contained in:
parent
8ad0cd0895
commit
a06e5cf8e8
@ -247,7 +247,7 @@
|
|||||||
+
|
+
|
||||||
+ // If the event is cancelled we move the player back to their old location.
|
+ // If the event is cancelled we move the player back to their old location.
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutPosition(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch(), Collections.<PacketPlayOutPosition.EnumPlayerTeleportFlags>emptySet(), this.teleportAwait));
|
+ teleport(from);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -375,7 +375,7 @@
|
|||||||
+
|
+
|
||||||
+ // If the event is cancelled we move the player back to their old location.
|
+ // If the event is cancelled we move the player back to their old location.
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutPosition(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch(), Collections.<PacketPlayOutPosition.EnumPlayerTeleportFlags>emptySet(), this.teleportAwait));
|
+ teleport(from);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user