fix screen not being cleared properly

This commit is contained in:
LordMZTE 2021-11-13 01:08:16 +01:00
parent 980b4a8d2b
commit 3356695d43
1 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,12 @@ while true do
for i, p in ipairs(players) do
local pos = pl_detector.getPlayerPos(p)
mon.setCursorPos(1, i)
mon.write(p .. " @ X: " .. pos.x .. " Y: " .. pos.y .. " Z: " .. pos.z)
mon.clear()
if pos == nil then
mon.write(p .. " @ ?")
else
mon.write(p .. " @ X: " .. pos.x .. " Y: " .. pos.y .. " Z: " .. pos.z)
end
end
sleep(2)