mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-21 07:49:35 +00:00
20 lines
1.7 KiB
Diff
20 lines
1.7 KiB
Diff
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 22ead092ae984d1eaa052fe97981ce3c49b521d8..9036306e153a7b3e919a9c8ecdf162d91359e38e 100644
|
|
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
|
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
|
@@ -38,7 +38,7 @@ public class SignedMessageChain {
|
|
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.chain_broken"), false); // Paper - diff on change (if disconnects, need a new kick event cause)
|
|
} else if (playerPublicKey.data().hasExpired()) {
|
|
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.expiredProfileKey"), false, org.bukkit.event.player.PlayerKickEvent.Cause.EXPIRED_PROFILE_PUBLIC_KEY); // Paper - kick event causes
|
|
- } else if (body.timeStamp().isBefore(this.lastTimeStamp)) {
|
|
+ } else if (body.timeStamp().isBefore(this.lastTimeStamp) && !top.leavesmc.leaves.LeavesConfig.disableCheckOutOfOrderCommand) { // Leaves - disable check to support Velocity
|
|
throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.out_of_order_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
|
|
} else {
|
|
this.lastTimeStamp = body.timeStamp();
|