From eb03feebd93075cbde516424c31c7b47bab94516 Mon Sep 17 00:00:00 2001 From: pkt77 Date: Wed, 6 Dec 2023 11:22:01 -0500 Subject: [PATCH] Fix TabList NPE --- .../com/velocitypowered/proxy/tablist/VelocityTabList.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java index d910135e9..b207ce4bf 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java @@ -252,7 +252,8 @@ public class VelocityTabList implements InternalTabList { currentEntry.setLatencyWithoutUpdate(entry.getLatency()); } if (actions.contains(UpsertPlayerInfo.Action.UPDATE_DISPLAY_NAME)) { - currentEntry.setDisplayNameWithoutUpdate(entry.getDisplayName().getComponent()); + currentEntry.setDisplayNameWithoutUpdate(entry.getDisplayName() != null + ? entry.getDisplayName().getComponent() : null); } if (actions.contains(UpsertPlayerInfo.Action.INITIALIZE_CHAT)) { currentEntry.setChatSession(entry.getChatSession()); @@ -268,4 +269,4 @@ public class VelocityTabList implements InternalTabList { this.entries.remove(uuid); } } -} +} \ No newline at end of file