From d19f0e9b269d4483c55ce8f14b5d722a8f94b686 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 26 Dec 2023 14:33:31 +1100 Subject: [PATCH] Use provided case for non-existent OfflinePlayers Fixes issues with using scoreboards to provide information via pseudo players being all lowercased. Ported from Spigot commit e11d481452829c1e3dfdc057bbfd0f43e5c75a66 By: md_5 --- .../net/minecraft/server/players/UserCache.patch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/paper-server/nms-patches/net/minecraft/server/players/UserCache.patch b/paper-server/nms-patches/net/minecraft/server/players/UserCache.patch index 78c40358b9..58913080d3 100644 --- a/paper-server/nms-patches/net/minecraft/server/players/UserCache.patch +++ b/paper-server/nms-patches/net/minecraft/server/players/UserCache.patch @@ -1,11 +1,6 @@ --- a/net/minecraft/server/players/UserCache.java +++ b/net/minecraft/server/players/UserCache.java -@@ -1,3 +1,4 @@ -+// mc-dev import - package net.minecraft.server.players; - - import com.google.common.collect.ImmutableList; -@@ -85,7 +86,7 @@ +@@ -85,7 +85,7 @@ } public void onProfileLookupFailed(String s1, Exception exception) { @@ -14,3 +9,12 @@ } }; +@@ -142,7 +142,7 @@ + usercache_usercacheentry.setLastAccess(this.getNextOperation()); + optional = Optional.of(usercache_usercacheentry.getProfile()); + } else { +- optional = lookupGameProfile(this.profileRepository, s1); ++ optional = lookupGameProfile(this.profileRepository, s); // CraftBukkit - use correct case for offline players + if (optional.isPresent()) { + this.add((GameProfile) optional.get()); + flag = false;