mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Add PrepareGrindstoneEvent
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From 9ecbe216e237d1ec36d673217db1c26e514748be 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
|
||||
|
||||
Reference in New Issue
Block a user