Paper/Spigot-Server-Patches/0579-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
Daniel Ennis e792da723a
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
30885166 Update to Minecraft 1.16.4

CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4

Spigot Changes:
f011ca24 Update to Minecraft 1.16.4

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2020-11-02 20:22:15 -06:00

20 Zeilen
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 3 Oct 2020 22:00:27 -0500
Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
not enabled
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index dc511024a771a343b0fbebda3492bac258293a07..9c4ea5265e55d99f95c0e54abb2dbe8987da12fc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1896,6 +1896,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.aN()) {
PlayerList playerlist = commandlistenerwrapper.getServer().getPlayerList();
WhiteList whitelist = playerlist.getWhitelist();
+ if (!((DedicatedServer)getServer()).getDedicatedServerProperties().whiteList.get()) return; // Paper - white list not enabled
List<EntityPlayer> list = Lists.newArrayList(playerlist.getPlayers());
Iterator iterator = list.iterator();