mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
9889c651ce
I managed to move it, yet forgot to actually fix it up...
20 lines
1.1 KiB
Diff
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 97085ae04f77b79a367cd328905d4b68ebaca133..6d00525b24efa76931ff4dd2bdf1947b1466930a 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -2008,6 +2008,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();
|
|
|