SteamWar/BungeeCore
Archiviert
13
2

Hotfix LoginResult
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-02-20 17:05:44 +01:00
Ursprung 978fd1abe0
Commit 8a20d41f95

Datei anzeigen

@ -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.api.connection.ProxiedPlayer;
import net.md_5.bungee.chat.ComponentSerializer; import net.md_5.bungee.chat.ComponentSerializer;
import net.md_5.bungee.connection.InitialHandler; import net.md_5.bungee.connection.InitialHandler;
import net.md_5.bungee.connection.LoginResult;
import net.md_5.bungee.protocol.Property; import net.md_5.bungee.protocol.Property;
import java.util.List; import java.util.List;
@ -38,11 +39,11 @@ interface TablistPart {
class Item { class Item {
public static Property[] playerProperties(ProxiedPlayer player) { public static Property[] playerProperties(ProxiedPlayer player) {
InitialHandler handler = (InitialHandler) player.getPendingConnection(); LoginResult loginResult = ((InitialHandler) player.getPendingConnection()).getLoginProfile();
if(handler == null) if(loginResult == null)
return new Property[0]; return new Property[0];
return handler.getLoginProfile().getProperties(); return loginResult.getProperties();
} }
private final UUID uuid; private final UUID uuid;