PaperMC/Spigot-Server-Patches/0695-forced-whitelist-use-configurable-kick-message.patch

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 176a17582cb3b29a2ed430914ba8c0582bffe541..d9ea784758fe52782042ce4b61faa915f895b3f8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2042,7 +2042,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
}
}