mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
19 lines
1.2 KiB
Diff
19 lines
1.2 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/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
|
index e8515f4ed1f29ba926bc4ab6d918722aee450ac2..6914ab77fc868844c391ac41ba2d344a26012208 100644
|
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
|
@@ -101,7 +101,7 @@ public class GameProfileCache {
|
|
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 = Player.createPlayerUUID(new GameProfile((UUID) null, name));
|
|
|
|
return Optional.of(new GameProfile(uuid, name));
|