Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.find("player_detector")
- term.setCursorPos(1,1)
- maxNameLength=1
- while true do
- players=p.getOnlinePlayers()
- if players~=nil then
- playerInfo={}
- for i=1,#players do
- playerInfo[i]=p.getPlayer(players[i])
- if #players[i]>maxNameLength then
- maxNameLength=#players[i]
- end
- end
- term.clear()
- for i=1,#players do
- term.setCursorPos(1,i)
- term.write(players[i])
- term.setCursorPos(maxNameLength+2,i)
- term.write(playerInfo[i].dimension)
- end
- end
- sleep(10)
- end
Add Comment
Please, Sign In to add comment