mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
From d3fc90698c11fde0a7c56d6147eb4f7d075abef4 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Fri, 12 Jun 2020 16:51:39 -0700
|
|
Subject: [PATCH] PaperPR - Prevent position desync in playerconnection causing
|
|
tp exploit
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/PlayerConnection.java | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 3a1aa1d4da..c13296935c 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1104,6 +1104,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
}
|
|
|
|
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
|
|
+ // Purpur start - prevent position desync
|
|
+ if (this.teleportPos != null) {
|
|
+ return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
|
+ }
|
|
+ // Purpur end - prevent position desync
|
|
this.player.onGround = packetplayinflying.b();
|
|
double d12 = d8;
|
|
|
|
--
|
|
2.26.2
|
|
|