Skip to content

Conversation

@Lunar-Dawn
Copy link

@Lunar-Dawn Lunar-Dawn commented Apr 19, 2024

This should close #1, and it seems to work fine as far as my testing goes.

There are still two questions to resolve before it's truly done though:

  • How to document it in the example config. Most commands either do something that might be undesirable or may simply be spammy.
  • How to handle command failure. Currently the mod just logs an error, but the way I see it there are three other options
    • Throw and thus stop the server. Likely the safest, since it means that the server will never run only some of the commands, but it will tear down the entire server simply if a selector has no targets.
    • Stop executing this series of commands, still fairly safe since it'll never run commands dependent on previous commands that failed, but may still run initial erroneous ones. This is probably my preferred solution.
    • Stop all command execution until a reload, a middle ground that still keeps the server up but without commands possibly going awry. Not a good solution imo, as commands may just seem to silently stop working.

This would be much easier if Minecraft could tell us the difference between malformed commands, and commands that simply didn't run.

@Lunar-Dawn
Copy link
Author

I pushed a few more commits to fix those outstanding issues, it should be ready for merging now.

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.

Command hooks for alerts and post-clearing

1 participant