testserver/Spigot-Server-Patches/0697-forced-whitelist-use-c...

20 lines
1.1 KiB
Diff
Raw Normal View History

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
}
}