diff --git a/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch b/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch index a56079b3cd..6009edbd8c 100644 --- a/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch @@ -1262,11 +1262,12 @@ } } -@@ -1652,10 +_,11 @@ +@@ -1651,11 +_,12 @@ + public void kickUnlistedPlayers(CommandSourceStack commandSource) { if (this.isEnforceWhitelist()) { PlayerList playerList = commandSource.getServer().getPlayerList(); ++ if (!playerList.isUsingWhitelist()) return; // Paper - whitelist not enabled UserWhiteList whiteList = playerList.getWhiteList(); -+ if (!((net.minecraft.server.dedicated.DedicatedServer) this).getProperties().whiteList.get()) return; // Paper - whitelist not enabled for (ServerPlayer serverPlayer : Lists.newArrayList(playerList.getPlayers())) { - if (!whiteList.isWhiteListed(serverPlayer.getGameProfile())) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index f59b4a6998..381448d8eb 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -883,7 +883,7 @@ public final class CraftServer implements Server { @Override public boolean hasWhitelist() { - return this.getProperties().whiteList.get(); + return this.playerList.isUsingWhitelist(); } // NOTE: Temporary calls through to server.properies until its replaced