aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0697-forced-whitelist-use-configurable-kick-message.patch
blob: 9450a6476358dab87ae0fa146543692ef6fb1342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Sat, 27 Mar 2021 09:24:23 +0100
Subject: [PATCH] forced whitelist: use configurable kick message


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2aaddbe9cad6433f0243c658716825641b6c64c8..8ee622108cebff2bba8a44fb255a3b6c03ed0220 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2040,7 +2040,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
                 EntityPlayer entityplayer = (EntityPlayer) iterator.next();
 
                 if (!whitelist.isWhitelisted(entityplayer.getProfile())) {
-                    entityplayer.playerConnection.disconnect(new ChatMessage("multiplayer.disconnect.not_whitelisted"));
+                    entityplayer.playerConnection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
                 }
             }