mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
654b792caf
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:a339310c
#755: Fix NPE when calling getInventory() for virtual EnderChests2577f9bf
Increase outdated build delay1dabfdc8
#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
29 lines
1.7 KiB
Diff
29 lines
1.7 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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index 9a56f83e12c65cafe3d1fb00379b78e5ea59b3f1..e9c2fa0fe81320c5953b7dc4ec1cfdedc76068b6 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -941,9 +941,9 @@ public abstract class PlayerList {
|
|
}
|
|
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
|
boolean isOp = this.operators.d(gameprofile);
|
|
- boolean isWhitelisted = !this.hasWhitelist || isOp || this.whitelist.d(gameprofile);
|
|
+ boolean isWhitelisted = !this.getHasWhitelist() || isOp || this.whitelist.d(gameprofile);
|
|
final com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent event;
|
|
- event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(MCUtil.toBukkit(gameprofile), this.hasWhitelist, isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage);
|
|
+ event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(MCUtil.toBukkit(gameprofile), this.getHasWhitelist(), isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage);
|
|
event.callEvent();
|
|
if (!event.isWhitelisted()) {
|
|
if (loginEvent != null) {
|