Paper/patches/server/0100-Don-t-lookup-game-prof...

20 lines
1.2 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 16 Jul 2016 19:11:17 -0500
Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
2022-03-30 20:28:38 +00:00
index fdf2557ed19c6ba9c64eddd2876b2434925dcf36..d8acbce8c2f0cc9a93fff044b25629021bf90f75 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
2021-07-07 06:52:40 +00:00
@@ -101,7 +101,7 @@ public class GameProfileCache {
2021-06-11 12:02:28 +00:00
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
2021-06-12 06:02:49 +00:00
- 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
2021-06-11 12:02:28 +00:00
UUID uuid = Player.createPlayerUUID(new GameProfile((UUID) null, name));
2021-07-07 06:52:40 +00:00
return Optional.of(new GameProfile(uuid, name));