mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
17f71ac87b
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 Bukkit Changes: 70d24eb8 SPIGOT-6587: Update documentation/error of drop chance API CraftBukkit Changes: 470050ad SPIGOT-6587: Update documentation/error of drop chance API 1c39efa3 Fix Inventory#getViewers on the player inventory not returning the player first time their inventory is opened d161627d Fix PrepareItemCraftEvent#isRepair aa1fae73 SPIGOT-6586: EntityChangeBlockEvent for falling block does not cancel properly 8a04072e SPIGOT-6583: Throwing eggs doesn't make sounds Spigot Changes: f773da84 Remove redundant patch cd367234 Rebuild patches
36 lines
2.3 KiB
Diff
36 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 2 Mar 2019 16:12:35 -0500
|
|
Subject: [PATCH] MC-145260: Fix Whitelist On/Off inconsistency
|
|
|
|
mojang stored whitelist state in 2 places (Whitelist Object, PlayerList)
|
|
|
|
some things checked PlayerList, some checked object. This moves
|
|
everything to the Whitelist object.
|
|
|
|
https://github.com/PaperMC/Paper/issues/1880
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index 726e0bf623d17ee88e64d3cab1747133500c5d72..20b218c658710055172c61fae5eaf255af5708a8 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -62,6 +62,7 @@ import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket;
|
|
import net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket;
|
|
import net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket;
|
|
import net.minecraft.resources.ResourceKey;
|
|
+import net.minecraft.server.MCUtil;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.server.PlayerAdvancements;
|
|
import net.minecraft.server.ServerScoreboard;
|
|
@@ -1002,9 +1003,9 @@ public abstract class PlayerList {
|
|
}
|
|
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
|
boolean isOp = this.ops.contains(gameprofile);
|
|
- boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile);
|
|
+ boolean isWhitelisted = !this.isUsingWhitelist() || isOp || this.whitelist.contains(gameprofile); // Paper - use isUsingWhitelist()
|
|
final com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent event;
|
|
- event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(net.minecraft.server.MCUtil.toBukkit(gameprofile), this.doWhiteList, isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage);
|
|
+ event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(net.minecraft.server.MCUtil.toBukkit(gameprofile), this.isUsingWhitelist(), isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use isUsingWhitelist()
|
|
event.callEvent();
|
|
if (!event.isWhitelisted()) {
|
|
if (loginEvent != null) {
|