Latte-Corporation / HardLoop

A Minecraft server project with automated resets and infinite gameplay loops, designed to enhance survival challenges.
MIT License
3 stars 0 forks source link

feat: Improve player death handling and server reset logic #9

Closed Razano26 closed 2 months ago

Razano26 commented 2 months ago

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.