aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0266-Configurable-connection-throttle-kick-message.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2022-03-30 13:28:38 -0700
committerGitHub <[email protected]>2022-03-30 13:28:38 -0700
commit7f47b9b7f84f9bee31b3e046a8dcbd28ec012fe0 (patch)
tree08dd0cadd782982719e33315c2ae5687b2ce21fb /patches/server/0266-Configurable-connection-throttle-kick-message.patch
parentd3c102373f90cffa1be2a19ce671d99d563ff9ca (diff)
downloadPaper-7f47b9b7f84f9bee31b3e046a8dcbd28ec012fe0.tar.gz
Paper-7f47b9b7f84f9bee31b3e046a8dcbd28ec012fe0.zip
Remove KeyedObject interface (#7680)
Diffstat (limited to 'patches/server/0266-Configurable-connection-throttle-kick-message.patch')
-rw-r--r--patches/server/0266-Configurable-connection-throttle-kick-message.patch35
1 files changed, 0 insertions, 35 deletions
diff --git a/patches/server/0266-Configurable-connection-throttle-kick-message.patch b/patches/server/0266-Configurable-connection-throttle-kick-message.patch
deleted file mode 100644
index 369ed58059..0000000000
--- a/patches/server/0266-Configurable-connection-throttle-kick-message.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Shane Freeder <[email protected]>
-Date: Tue, 2 Oct 2018 09:57:50 +0100
-Subject: [PATCH] Configurable connection throttle kick message
-
-
-diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
-index 0e4cb05e78ff78bce6ca42fd30b6f9ff42f87f7d..b0b3820e9609b301f92545c87289279df975424e 100644
---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
-+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
-@@ -294,6 +294,11 @@ public class PaperConfig {
- authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
- }
-
-+ public static String connectionThrottleKickMessage = "Connection throttled! Please wait before reconnecting.";
-+ private static void connectionThrottleKickMessage() {
-+ connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
-+ }
-+
- private static void savePlayerData() {
- Object val = config.get("settings.save-player-data");
- if (val instanceof Boolean) {
-diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
-index a95b2ee0e80832f786bdb8f3d0bc00cbfae26fd4..86f99fbe3eb7a6c7ef288d7bff1d653df6f34790 100644
---- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
-+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
-@@ -50,7 +50,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);
-- TranslatableComponent chatmessage = new TranslatableComponent("Connection throttled! Please wait before reconnecting.");
-+ TranslatableComponent chatmessage = new TranslatableComponent(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
- this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
- this.connection.disconnect(chatmessage);
- return;