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

Run RCON commands on player death. #3165

Open
holy-elbow opened this issue Nov 26, 2024 · 1 comment
Open

Run RCON commands on player death. #3165

holy-elbow opened this issue Nov 26, 2024 · 1 comment

Comments

@holy-elbow
Copy link

holy-elbow commented Nov 26, 2024

Enhancement Type

A completely new feature

Describe the enhancement

add a variable to run rcon commands on player death: been trying to get a bash script to work, but struggling with a lack of familiarity with rcon and detecting minecraft events.

should add I have tried both using tail -f for latest.log to search for player death but the variation in death messages makes this unreliable. I had more success with a scoreboard object that tracks deathCount, running commands and then resetting the scoreboard back to 0. My problem is I cannot figure out how to get this to work with a persistent rcon connection, or by checking the scoreboard without an rcon call. This results in spamming the logs with constant rcon messages. Any help would be appreciated!

@itzg
Copy link
Owner

itzg commented Nov 27, 2024

I don't think that capability should be implemented as part of the image. As you pointed out, Minecraft doesn't have a way to hook into arbitrary events externally. This image basically preps the data directory and then kicks off the Minecraft server process. In case you're wondering, the player connected/disconnected handling is basically faked by having a loop query the status endpoint for player counts.

Implementing as a plugin would be much better IMHO. Or if you don't want to develop that, then something that reads the container logs via docker API would be next best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants