3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 20:40:07 +01:00
Paper/patches/server/0101-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch

20 Zeilen
1.2 KiB
Diff

2021-06-11 14:02:28 +02: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
index c70b4727fe0ae9ff7b9db08a9711272994159b96..87f5f4108796aa12b454bbf39b8c1d699bac78f2 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
2021-06-12 08:02:49 +02:00
@@ -100,7 +100,7 @@ public class GameProfileCache {
2021-06-11 14:02:28 +02:00
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
2021-06-12 08:02:49 +02: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 14:02:28 +02:00
UUID uuid = Player.createPlayerUUID(new GameProfile((UUID) null, name));
gameprofile = new GameProfile(uuid, name);