Paper/Spigot-Server-Patches/0575-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
Aikar 976c6d425b
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-02 15:37:24 -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 ef980b8cba0e30fc65b119d08a034ced7fdb2bc8..43b713476c6f841aafaac9f2a1216b937261efc2 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();