Waterfall/BungeeCord-Patches/0063-Add-message-for-outdated-clients-that-don-t-support-.patch
LinsaFTW 1efb2d439e
Updated Upstream (BungeeCord) (#844)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
d0fa62d4 Minecraft 24w06a support
464ed018 Improve cookie support during login
eda268b4 Fix 24w05b spectate packet ID
3e100752 #3612: Error when disconnecting player on PostLoginEvent
b52b1469 Add PendingConnection#isTransferred API method
94d5b0d0 Minecraft 24w05b support
c3f228f6 #3610, 3611: inverted isEmpty method on ComponentStyle
02c5c1ee #3602: Minecraft 24w04a support
c69acf72 Add JetBrains java-annotations
a1cd6943 Bump version to 1.20-R0.3-SNAPSHOT
3e2bc8e2 Release 1.20-R0.2
ad7163d2 #3600: Bump io.netty:netty-bom from 4.1.104.Final to 4.1.106.Final
2024-02-24 17:21:31 +00:00

37 lines
2.2 KiB
Diff

From e7688bc1a3e0fbb881635096f464772f804ec2be Mon Sep 17 00:00:00 2001
From: Aurora <aurora@relanet.eu>
Date: Mon, 18 Jul 2022 15:56:05 +0200
Subject: [PATCH] Add message for outdated clients that don't support secure
profiles
Clients before 1.19 don't support secure profiles, but since secure profiles is one of the first
things checked those outdated clients didn't get a useful message telling them to update.
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index f5959b66..72d48c72 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -427,6 +427,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( BungeeCord.getInstance().config.isEnforceSecureProfile() && getVersion() < ProtocolConstants.MINECRAFT_1_19_3 )
{
+ if ( handshake.getProtocolVersion() < ProtocolConstants.MINECRAFT_1_19 ) {disconnect(bungee.getTranslation("secure_profile_unsupported"));} // Waterfall - Tell old clients to update if secure profiles are required
PlayerPublicKey publicKey = loginRequest.getPublicKey();
if ( publicKey == null )
{
diff --git a/proxy/src/main/resources/messages.properties b/proxy/src/main/resources/messages.properties
index 149c742f..8d5075f6 100644
--- a/proxy/src/main/resources/messages.properties
+++ b/proxy/src/main/resources/messages.properties
@@ -25,6 +25,7 @@ offline_mode_player=\u00a7cNot authenticated with Minecraft.net
secure_profile_required=\u00a7cA secure profile is required to join this server.
secure_profile_expired=\u00a7cSecure profile expired.
secure_profile_invalid=\u00a7cSecure profile invalid.
+secure_profile_unsupported=\u00a7cOutdated client, secure profile not supported. Please use 1.19 or newer.
message_needed=\u00a7cYou must supply a message.
error_occurred_player=\u00a7cAn error occurred while parsing your message. (Hover for details)
error_occurred_console=\u00a7cAn error occurred while parsing your message: {0}
--
2.43.0.windows.1