PaperMC/Spigot-Server-Patches/0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch

20 lines
1 KiB
Diff
Raw Normal View History

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/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
2020-06-25 13:00:35 +02:00
index 4d3cbe3e517a75269d5c9cdd7f3751b81daee1c2..4f769211cf98c3da720a904da3dcdcd4c7611f0b 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
2020-06-25 13:00:35 +02:00
@@ -75,7 +75,7 @@ public class UserCache {
};
2019-05-28 01:01:45 +02:00
gameprofilerepository.findProfilesByNames(new String[]{s}, Agent.MINECRAFT, profilelookupcallback);
- if (!d() && agameprofile[0] == null) {
+ if (!d() && agameprofile[0] == null && !org.apache.commons.lang3.StringUtils.isBlank(s)) { // Paper - Don't lookup a profile with a blank name
UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
GameProfile gameprofile = new GameProfile(uuid, s);