-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable check out-of-order command (#46)
- Loading branch information
1 parent
060414f
commit f8783b7
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
patches/server/0068-Disable-check-out-of-order-command.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <[email protected]> | ||
Date: Thu, 15 Jun 2023 18:01:51 +0800 | ||
Subject: [PATCH] Disable check out-of-order command | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
index 0cc4bd960383759abeabe20c52e9af84228527a1..3100ad9c7da7e48d5c0f8b2a976cba708c62dfcb 100644 | ||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
@@ -2360,7 +2360,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic | ||
} | ||
|
||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { | ||
- if (!this.updateChatOrder(timestamp)) { | ||
+ if (!(top.leavesmc.leaves.LeavesConfig.disableCheckOutOfOrderCommand && message.startsWith("/")) && !this.updateChatOrder(timestamp)) { // Leaves - disable check to support Velocity | ||
ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper | ||
this.server.scheduleOnMain(() -> { // Paper - push to main | ||
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca |