Paper/Spigot-Server-Patches/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
Aikar a08be1ec7c
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
9294ebbf0 SPIGOT-5877: Add support for Vanilla custom dimensions
2021-04-15 20:47:34 -04:00

20 lines
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 604646affe004fce68a61640326fdaefeae72802..cd1cd1d4adbe6d304fd7634fa2fe712a0874e189 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2018,6 +2018,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();