Archiviert
1
0

Hotfix LoginResult

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.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;