Skip to content

Commit 6adf4da

Browse files
fix(mc): correct the of counting players online on Minecraft servers via gamedig
1 parent 1639bd5 commit 6adf4da

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lgsm/modules/query_gamedig.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ if [ "$(command -v "${gamedigbinary}" 2> /dev/null)" ] && [ "$(command -v jq 2>
4242
fi
4343

4444
# numplayers.
45-
if [ "${querytype}" == "minecraft" ]; then
46-
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1')
47-
elif [ "${querytype}" == "teamspeak3" ]; then
45+
if [ "${querytype}" == "teamspeak3" ]; then
4846
gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline')
4947
else
5048
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length')

0 commit comments

Comments
 (0)