aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0145-ProfileWhitelistVerifyEvent.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-07-18 16:50:16 +0200
committerNassim Jahnke <[email protected]>2024-07-18 18:15:13 +0200
commita8db5274493f3bf6c91c8bc9d4a3618a02ba5500 (patch)
tree117f005d0e84f51bcdaeedf55bf7fd6cb3766932 /patches/server/0145-ProfileWhitelistVerifyEvent.patch
parent3c8a7fe1a4a7e348106795ca44529ff6d2005234 (diff)
downloadPaper-a8db5274493f3bf6c91c8bc9d4a3618a02ba5500.tar.gz
Paper-a8db5274493f3bf6c91c8bc9d4a3618a02ba5500.zip
Even more cleanup of mcutil patch
Diffstat (limited to 'patches/server/0145-ProfileWhitelistVerifyEvent.patch')
-rw-r--r--patches/server/0145-ProfileWhitelistVerifyEvent.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/patches/server/0145-ProfileWhitelistVerifyEvent.patch b/patches/server/0145-ProfileWhitelistVerifyEvent.patch
index fc614a6bf3..69af001b9f 100644
--- a/patches/server/0145-ProfileWhitelistVerifyEvent.patch
+++ b/patches/server/0145-ProfileWhitelistVerifyEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index d5f17d7e3b56ca87ec9070b69265ce098de61f69..fec45c058695e68a907684880c87ccf11827565d 100644
+index d5f17d7e3b56ca87ec9070b69265ce098de61f69..768a5c6ebc4466aae4108a79e1564b2bfc93463a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -624,9 +624,9 @@ public abstract class PlayerList {
@@ -21,7 +21,7 @@ index d5f17d7e3b56ca87ec9070b69265ce098de61f69..fec45c058695e68a907684880c87ccf1
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
-@@ -993,7 +993,23 @@ public abstract class PlayerList {
+@@ -993,7 +993,24 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {
@@ -33,7 +33,8 @@ index d5f17d7e3b56ca87ec9070b69265ce098de61f69..fec45c058695e68a907684880c87ccf1
+ boolean isOp = this.ops.contains(gameprofile);
+ boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile);
+ final com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent event;
-+ event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(io.papermc.paper.util.MCUtil.toBukkit(gameprofile), this.doWhiteList, isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage);
++
++ event = new com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent(com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile), this.doWhiteList, isWhitelisted, isOp, org.spigotmc.SpigotConfig.whitelistMessage);
+ event.callEvent();
+ if (!event.isWhitelisted()) {
+ if (loginEvent != null) {