From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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 47ad733022e5d17d839209e4163e8508e57b43c8..c2892af4e98d6a436a43fea950726cc1ca60ebda 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2151,13 +2151,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = Lists.newArrayList(playerlist.getPlayers()); Iterator iterator = list.iterator(); while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); - if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) { + if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420) entityplayer.connection.disconnect(Component.translatable("multiplayer.disconnect.not_whitelisted")); } }