Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

Razano26
Copy link
Member

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.

Signed-off-by: Louis Labeyrie <labeyrielouis@gmail.com>
@Razano26 Razano26 self-assigned this Aug 28, 2024
@Razano26 Razano26 linked an issue Aug 28, 2024 that may be closed by this pull request
@Razano26 Razano26 merged commit a752180 into main Aug 28, 2024
1 check passed
@Razano26 Razano26 deleted the 8-fix-observer branch August 28, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix observer
1 participant