Fix even more errors

This commit is contained in:
Jake Potrebic 2022-06-07 14:15:14 -07:00
parent 3773770230
commit 7d7779a667
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
4 changed files with 17 additions and 19 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 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b099e999a 100644
index 41924db9df7d3d9df0385d3274894ef8058cf2c6..fe1636a73f1af09314a200b99c196984d09a4b4a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -619,9 +619,9 @@ public abstract class PlayerList {
@ -21,16 +21,15 @@ index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -1002,9 +1002,25 @@ public abstract class PlayerList {
this.server.getCommands().sendCommands(player);
@@ -1003,7 +1003,23 @@ public abstract class PlayerList {
}
+ // Paper start
public boolean isWhiteListed(GameProfile profile) {
- return !this.doWhiteList || this.ops.contains(profile) || this.whitelist.contains(profile);
+ return isWhitelisted(profile, null);
+ // Paper start
+ return isWhiteListed(profile, null);
+ }
+ public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
+ 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);
+ final com.destroystokyo.paper.event.profile.ProfileWhitelistVerifyEvent event;
@ -43,8 +42,7 @@ index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b
+ return false;
+ }
+ return true;
+ // Paper end
}
+ // Paper end
public boolean isOp(GameProfile profile) {
return this.ops.contains(profile) || this.server.isSingleplayerOwner(profile) && this.server.getWorldData().getAllowCommands() || this.allowCheatsForAllPlayers;