From cf7b1e8fe54814e0e86608751ca511dd1262552c Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Wed, 14 Oct 2015 18:58:28 +0200 Subject: [PATCH] send only one player_info packet, now that the problem has been solved: don't send the displayName --- src/lib/playerPlugins/login.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lib/playerPlugins/login.js b/src/lib/playerPlugins/login.js index 36cf9a0..9384225 100644 --- a/src/lib/playerPlugins/login.js +++ b/src/lib/playerPlugins/login.js @@ -165,18 +165,17 @@ function inject(serv,player) }] }); - serv.players.map((otherPlayer) => { - player._client.write('player_info', { - action: 0, - data: [{ - UUID: otherPlayer._client.uuid, - name: otherPlayer.username, - properties: [], - gamemode: otherPlayer.gameMode, - ping: 1 - }] - }); + player._client.write('player_info', { + action: 0, + data: serv.players.map((otherPlayer) => ({ + UUID: otherPlayer._client.uuid, + name: otherPlayer.username, + properties: [], + gamemode: otherPlayer.gameMode, + ping: 1 + })) }); + }