Fix don't lookup profiles for blank names patch

This commit is contained in:
Shane Freeder 2022-06-09 22:37:26 +01:00
parent 09c9215b85
commit ad51c406d5
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
5 changed files with 24 additions and 23 deletions

View file

@ -6,18 +6,20 @@ Subject: [PATCH] Add setting for proxy online mode status
TODO: Add isProxyOnlineMode check to Metrics
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 87b7a669ef111b2dc40d152fe6fe4e75ff8ccc98..40ddeaea58263820c32a4e901a2e907088eb7b6e 100644
index d00e8486c145200b2431cf92d7049a6d87d55227..c7edbd12361cfd3dcf1359917d579fae4c3cc8a7 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -98,6 +98,7 @@ public class GameProfileCache {
@@ -98,7 +98,8 @@ public class GameProfileCache {
}
};
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) // Paper - only run in online mode - 100 COL
- if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name) // Paper - Don't lookup a profile with a blank name
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) // Paper - only run in online mode - 100 COL
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
@@ -115,7 +116,7 @@ public class GameProfileCache {
@@ -116,7 +117,7 @@ public class GameProfileCache {
}
private static boolean usesAuthentication() {