testserver/Spigot-Server-Patches/0107-Don-t-lookup-game-prof...

20 lines
1.1 KiB
Diff

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
index f61cf940f21288fc6e8faf9519d2366436146d1f..e89c92aded564fe689cc1aa8d0c83abb72f7b10c 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -89,7 +89,7 @@ public class UserCache {
gameprofilerepository.findProfilesByNames(new String[]{s}, Agent.MINECRAFT, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
- if (!c() && gameprofile == null) {
+ if (!c() && gameprofile == 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 = new GameProfile(uuid, s);