From bf4b541513c41f48d7eb54ec939c8c4d812155f6 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jun 2020 09:43:47 +0100 Subject: [PATCH] Fix missing hunk from ProfileWhitelistVerifyEvent (Fixes #3645) --- .../0160-ProfileWhitelistVerifyEvent.patch | 9 ++++++--- .../0269-Use-ConcurrentHashMap-in-JsonList.patch | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch index 952506a0c6..4f74944e59 100644 --- a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch @@ -5,12 +5,15 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 650755c0a6df59260a5f7c8cb041b2a8fe63e4a8..edb59cf7dc797384bba9d37f486b624753d4f31c 100644 +index 650755c0a6df59260a5f7c8cb041b2a8fe63e4a8..fbacfe2c825f71b3c8617a3bf022f6793eb64996 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -542,7 +542,7 @@ public abstract class PlayerList { +@@ -540,9 +540,9 @@ public abstract class PlayerList { + + // return chatmessage; if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot - } else if (!this.isWhitelisted(gameprofile)) { +- } else if (!this.isWhitelisted(gameprofile)) { ++ } else if (!this.isWhitelisted(gameprofile, event)) { // Paper chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); - event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot + //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted diff --git a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch index 865728cdf5..ebca7093e0 100644 --- a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,11 +122,11 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 509451c73892147419ef4cf23b449c61d21cf279..7c88e370c19554652d4a580252e657747180047d 100644 +index 31ffa627417745f87917933cb96873fd8657b49a..850a88c5b7887baf40787b21c04f40b9809157d7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,7 +543,7 @@ public abstract class PlayerList { - } else if (!this.isWhitelisted(gameprofile)) { + } else if (!this.isWhitelisted(gameprofile, event)) { // Paper chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted - } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {