summaryrefslogtreecommitdiffhomepage
path: root/patches/server/0680-Fix-incorrect-message-for-outdated-client.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0680-Fix-incorrect-message-for-outdated-client.patch')
-rw-r--r--patches/server/0680-Fix-incorrect-message-for-outdated-client.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0680-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0680-Fix-incorrect-message-for-outdated-client.patch
new file mode 100644
index 0000000000..7f39718ca5
--- /dev/null
+++ b/patches/server/0680-Fix-incorrect-message-for-outdated-client.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: sulu5890 <[email protected]>
+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
+index b02cbf6bcc57167a1373925f652950e0212dfa4f..08b21f5a7a07f44f8044f56991fb6723cd8f3eea 100644
+--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+@@ -80,7 +80,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
+ if (packet.getProtocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
+ Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
+
+- if (packet.getProtocolVersion() < 754) {
++ if (packet.getProtocolVersion() < 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() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
+ } else {
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages