Refactor the code in observer.py to handle player deaths more efficiently.
Instead of checking for the presence of tracked entities, retrieve the list of players using the "/list" command and iterate through each player to check their death count using the "/scoreboard players get" command. If a player has a death count, kick them from the server, update the MOTD, and reset the server. This change improves the accuracy of detecting player deaths and ensures proper server reset.
Refactor the code in observer.py to handle player deaths more efficiently. Instead of checking for the presence of tracked entities, retrieve the list of players using the "/list" command and iterate through each player to check their death count using the "/scoreboard players get" command. If a player has a death count, kick them from the server, update the MOTD, and reset the server. This change improves the accuracy of detecting player deaths and ensures proper server reset.