From f2177204beedbbacc71bd3bd52b87b4c7bd19ebc Mon Sep 17 00:00:00 2001 From: Pascal Sthamer Date: Sat, 15 Feb 2020 22:05:13 +0100 Subject: [PATCH] Fix wrong player count in minecraftvanilla protocol --- protocols/minecraftvanilla.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/protocols/minecraftvanilla.js b/protocols/minecraftvanilla.js index c55294e..7ea0a4b 100644 --- a/protocols/minecraftvanilla.js +++ b/protocols/minecraftvanilla.js @@ -54,9 +54,10 @@ class MinecraftVanilla extends Core { name: player.name }); } - } - for (let i = 0; i < Math.min(json.players.online, 10000); i++) { - state.players.push({}); + } else { + for (let i = 0; i < Math.min(json.players.online, 10000); i++) { + state.players.push({}); + } } }