Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
20 Zeilen
1.9 KiB
Diff
20 Zeilen
1.9 KiB
Diff
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
|
|
index 2824369960130fa3d0ad416a3961024c8f8d5f52..74ad6baea209bb0152198d48671e3f1c80ac73e2 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
|
@@ -82,7 +82,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
|
if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
|
Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
|
|
|
|
- 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 {
|
|
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
|