Paper/patches/server/0634-Fix-incorrect-message-for-outdated-client.patch

20 lines
1.9 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: sulu5890 <sulu@sulu.me>
Date: Sun, 11 Jul 2021 19:34:03 -0500
Subject: [PATCH] Fix incorrect message for outdated client
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
2023-09-23 00:33:14 +02:00
index ae6efc0b8fe1787300a4c6d223dfe48df861ecc6..73f12e176acc0a035d3283cf5ecebcb1b8b06b73 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
2023-03-14 21:25:13 +01:00
@@ -82,7 +82,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
2023-09-22 09:24:44 +02:00
if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
2022-06-08 11:31:06 +02:00
Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
2023-09-22 09:24:44 +02:00
- if (packet.protocolVersion() < 754) {
+ if (packet.protocolVersion() < SharedConstants.getCurrentVersion().getProtocolVersion()) { // Paper - Fix incorrect message for outdated clients
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
} else {
2023-09-22 09:24:44 +02:00
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages