Fixed track_players mod.

This commit is contained in:
Sascha L. Teichmann 2015-03-10 12:57:00 +01:00
parent 524fe451b1
commit 65caefaf85
2 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,7 @@ var geoJSONTmpl = template.Must(template.New("geojson").Parse(
"coordinates": [{{.Z}}, {{.X}}] "coordinates": [{{.Z}}, {{.X}}]
}, },
"properties": { "properties": {
"name": "{{.Name | html }}" "name": "{{.Name | html }}"
} }
}`)) }`))

View File

@ -13,6 +13,9 @@ function players_data()
z = pos.z } z = pos.z }
table.insert(ps, data) table.insert(ps, data)
end end
if table.getn(ps) == 0 then
return '[]\n'
end
return minetest.write_json(ps) .. '\n' return minetest.write_json(ps) .. '\n'
end end