Fix another missed offline mode case
This commit is contained in:
parent
1f132876e6
commit
4bb3850b40
@ -113,6 +113,7 @@ public class Global extends TabList
|
|||||||
item.setUsername( player.getName() );
|
item.setUsername( player.getName() );
|
||||||
item.setDisplayName( ComponentSerializer.toString( TextComponent.fromLegacyText( player.getDisplayName() ) ) );
|
item.setDisplayName( ComponentSerializer.toString( TextComponent.fromLegacyText( player.getDisplayName() ) ) );
|
||||||
LoginResult loginResult = ( (UserConnection) player ).getPendingConnection().getLoginProfile();
|
LoginResult loginResult = ( (UserConnection) player ).getPendingConnection().getLoginProfile();
|
||||||
|
if ( loginResult != null ) {
|
||||||
String[][] props = new String[ loginResult.getProperties().length ][];
|
String[][] props = new String[ loginResult.getProperties().length ][];
|
||||||
for ( int j = 0; j < props.length; j++ )
|
for ( int j = 0; j < props.length; j++ )
|
||||||
{
|
{
|
||||||
@ -124,6 +125,10 @@ public class Global extends TabList
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
item.setProperties( props );
|
item.setProperties( props );
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
item.setProperties( new String[ 0 ][ 0 ] );
|
||||||
|
}
|
||||||
item.setGamemode( ( (UserConnection) player ).getGamemode() );
|
item.setGamemode( ( (UserConnection) player ).getGamemode() );
|
||||||
item.setPing( player.getPing() );
|
item.setPing( player.getPing() );
|
||||||
packet.setItems( new PlayerListItem.Item[]
|
packet.setItems( new PlayerListItem.Item[]
|
||||||
|
Loading…
Reference in New Issue
Block a user