testserver/patches/server/0152-Allow-specifying-a-cus...

23 lines
1.7 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 17 Aug 2017 16:08:20 -0700
Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
message
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index dc932515bada7f84a386827f3b7e1e8f69bd7159..9fe3ec7e6bd194b825a1b29bcff9fcd5e21f22ad 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
2022-06-07 20:12:48 +00:00
@@ -358,6 +358,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
2021-06-11 12:02:28 +00:00
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
} else {
2022-06-07 20:12:48 +00:00
+ // Paper start
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.authenticationServersDown.isEmpty()) {
+ ServerLoginPacketListenerImpl.this.disconnect(Component.literal(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.authenticationServersDown));
2022-06-07 20:12:48 +00:00
+ } else // Paper end
ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
2021-06-11 12:02:28 +00:00
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable");
}