Even more cleanup of mcutil patch

This commit is contained in:
Nassim Jahnke 2024-07-18 16:50:16 +02:00
parent 3c8a7fe1a4
commit a8db527449
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
59 changed files with 282 additions and 1154 deletions

View file

@ -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) {