Paper/patches/server/0498-forced-whitelist-use-configurable-kick-message.patch

20 lines
1.2 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
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 9e96998a36b63a1723406819eccb7841a96753fb..c2e535834f6b94f52c835a8d89c98220eb13bce9 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2024-10-27 18:11:15 +01:00
@@ -2325,7 +2325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
2021-06-11 14:02:28 +02:00
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
2024-06-13 23:42:02 +02:00
- entityplayer.connection.disconnect((Component) Component.translatable("multiplayer.disconnect.not_whitelisted"));
+ entityplayer.connection.disconnect(net.kyori.adventure.text.Component.text(org.spigotmc.SpigotConfig.whitelistMessage));
2021-06-11 14:02:28 +02:00
}
}