mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-24 01:19:19 +00:00
Update Paper
This commit is contained in:
19
patches/server/0058-Disable-check-out-of-order-command.patch
Normal file
19
patches/server/0058-Disable-check-out-of-order-command.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 10 Dec 2023 13:13:14 +0800
|
||||
Subject: [PATCH] Disable check out-of-order command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
index 300929a406905f5ff1ede664d5b99fb0938d4d2e..82d7c376a0a71075f7a013518e284bfe3789f329 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
@@ -45,7 +45,7 @@ public class SignedMessageChain {
|
||||
SignedMessageLink signedMessageLink = SignedMessageChain.this.nextLink;
|
||||
if (signedMessageLink == null) {
|
||||
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.CHAIN_BROKEN);
|
||||
- } else if (body.timeStamp().isBefore(SignedMessageChain.this.lastTimeStamp)) {
|
||||
+ } else if (!org.leavesmc.leaves.LeavesConfig.disableCheckOutOfOrderCommand && body.timeStamp().isBefore(SignedMessageChain.this.lastTimeStamp)) { // Leaves - disable check to support Velocity
|
||||
this.setChainBroken();
|
||||
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.OUT_OF_ORDER_CHAT, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
|
||||
} else {
|
||||
Reference in New Issue
Block a user