aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-11-04 14:11:55 -0700
committerGitHub <[email protected]>2023-11-04 14:11:55 -0700
commit0cdce89d595a2c1c097c9e2a5ff96687977b3b25 (patch)
treede63d6aa8112811f93b5d6afebbb069b9980870f /patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch
parent15a0de2eefb70ea8162cbb31056920adf80265fa (diff)
downloadPaper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.tar.gz
Paper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.zip
Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
Diffstat (limited to 'patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch')
-rw-r--r--patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch
new file mode 100644
index 0000000000..098bf69f0e
--- /dev/null
+++ b/patches/server/0794-Use-username-instead-of-display-name-in-PlayerList-g.patch
@@ -0,0 +1,20 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Doc <[email protected]>
+Date: Fri, 15 Apr 2022 17:40:30 -0400
+Subject: [PATCH] Use username instead of display name in
+ PlayerList#getPlayerStats
+
+
+diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
+index ba43aecf1a0cf7e2fabd8c01f0c75dc99592c264..80d1c6850e7ce3d48cf54297ffcf9f5a2903d216 100644
+--- a/src/main/java/net/minecraft/server/players/PlayerList.java
++++ b/src/main/java/net/minecraft/server/players/PlayerList.java
+@@ -1445,7 +1445,7 @@ public abstract class PlayerList {
+ // CraftBukkit start
+ public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
+ ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
+- return serverstatisticmanager == null ? this.getPlayerStats(entityhuman.getUUID(), entityhuman.getDisplayName().getString()) : serverstatisticmanager;
++ return serverstatisticmanager == null ? this.getPlayerStats(entityhuman.getUUID(), entityhuman.getGameProfile().getName()) : serverstatisticmanager; // Paper - use username and not display name
+ }
+
+ public ServerStatsCounter getPlayerStats(UUID uuid, String displayName) {