13
0
geforkt von Mirrors/Paper

Fix don't lookup profiles for blank names patch

Dieser Commit ist enthalten in:
Shane Freeder 2022-06-09 22:37:26 +01:00
Ursprung 44b93e65f2
Commit c0a157eb9f
2 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -13,7 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
};
+ 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();

Datei anzeigen

@ -9,11 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -0,0 +0,0 @@ public class GameProfileCache {
}
};
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
- if (!GameProfileCache.usesAuthentication() && gameprofile == null) {
+ if (!GameProfileCache.usesAuthentication() && gameprofile == null && !org.apache.commons.lang3.StringUtils.isBlank(name)) { // Paper - Don't lookup a profile with a blank name
UUID uuid = UUIDUtil.getOrCreatePlayerUUID(new GameProfile((UUID) null, name));
return Optional.of(new GameProfile(uuid, name));