From 8a20d41f950d88d723d6c7f9e833982ecd938458 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 20 Feb 2023 17:05:44 +0100 Subject: [PATCH] Hotfix LoginResult Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/tablist/TablistPart.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/bungeecore/tablist/TablistPart.java b/src/de/steamwar/bungeecore/tablist/TablistPart.java index e784d78..30c848f 100644 --- a/src/de/steamwar/bungeecore/tablist/TablistPart.java +++ b/src/de/steamwar/bungeecore/tablist/TablistPart.java @@ -26,6 +26,7 @@ import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.chat.ComponentSerializer; import net.md_5.bungee.connection.InitialHandler; +import net.md_5.bungee.connection.LoginResult; import net.md_5.bungee.protocol.Property; import java.util.List; @@ -38,11 +39,11 @@ interface TablistPart { class Item { public static Property[] playerProperties(ProxiedPlayer player) { - InitialHandler handler = (InitialHandler) player.getPendingConnection(); - if(handler == null) + LoginResult loginResult = ((InitialHandler) player.getPendingConnection()).getLoginProfile(); + if(loginResult == null) return new Property[0]; - return handler.getLoginProfile().getProperties(); + return loginResult.getProperties(); } private final UUID uuid;