From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 2 Oct 2018 09:57:50 +0100 Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java index 4170bda451df3db43e7d57d87d1abb81934d7dad..14fa831c9984e72ae2185c4f9e07f65b0c2ed67c 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -49,7 +49,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL synchronized (ServerHandshakePacketListenerImpl.throttleTracker) { if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) { ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime); - MutableComponent chatmessage = Component.literal("Connection throttled! Please wait before reconnecting."); + MutableComponent chatmessage = Component.literal(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.connectionThrottle); // Paper - Configurable connection throttle kick message this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage)); this.connection.disconnect(chatmessage); return;