#2362: Fixed tablist rewrite getting wrong field

Also only sets the ping in right circumstances.
This commit is contained in:
Joe 2018-02-25 20:00:37 +00:00 committed by md-5
parent a3b44aa612
commit 74e077e0fb

View File

@ -57,7 +57,10 @@ public abstract class TabList
{ {
player.setGamemode( item.getGamemode() ); player.setGamemode( item.getGamemode() );
} }
player.setPing( player.getPing() ); if ( playerListItem.getAction() == PlayerListItem.Action.ADD_PLAYER || playerListItem.getAction() == PlayerListItem.Action.UPDATE_LATENCY )
{
player.setPing( item.getPing() );
}
} }
} }
return playerListItem; return playerListItem;