testserver/patches/server/0646-forced-whitelist-use-c...

28 lines
1.5 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00: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
2021-06-17 17:11:00 +00:00
index 280a7ca4ae3a0ed92dd411c8e4e3f253b60f9a9d..6003dff25e78395a92ab279f1a93f016f4a79c56 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2021-06-15 02:59:31 +00:00
@@ -77,7 +77,6 @@ import net.minecraft.nbt.NbtOps;
2021-06-11 12:02:28 +00:00
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
-import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
2021-06-17 17:11:00 +00:00
@@ -2123,7 +2122,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
2021-06-11 12:02:28 +00:00
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) {
- entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted"));
+ entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
}
}