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
|
2021-08-25 09:59:26 +02:00
|
|
|
index 0d3c1cdeab7a95bbac166c27758ed1b57946dfea..14f45566d189fb1bff9c344116477f4df18e892a 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
|
2021-07-07 08:52:40 +02:00
|
|
|
@@ -74,7 +74,6 @@ import net.minecraft.nbt.NbtOps;
|
2021-06-11 14:02:28 +02: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-08-25 09:59:26 +02:00
|
|
|
@@ -2140,7 +2139,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())) {
|
|
|
|
- entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted"));
|
|
|
|
+ entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|