geforkt von Mirrors/Paper
28 Zeilen
1.7 KiB
Diff
28 Zeilen
1.7 KiB
Diff
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 6694e0d6d7d8d60f54ea1a2d2dcb5a8894b5b4b9..478eb61a9e5aab8b004e75c264eca9ca79e51fbb 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -73,7 +73,6 @@ import net.minecraft.nbt.NbtOps;
|
|
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.game.ClientboundChangeDifficultyPacket;
|
|
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
|
|
import net.minecraft.network.protocol.status.ServerStatus;
|
|
@@ -2042,7 +2041,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
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)
|
|
- entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted"));
|
|
+ entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
|
|
}
|
|
}
|
|
|