palworld-server-docker
palworld-server-docker copied to clipboard
add feature/AUTO_PAUSE
Context
This PR is a major feature addition for power saving.
If AUTO_PAUSE_ENABLED is true, servers with 0 online players will automatically go to sleep. It wakes up when it detects a client connection.
World time also stops during sleep.
If you want to stop the feature, use the autopause stop command.
If you want to restart the feature, use the autopause continue command.
Choices
Because I wanted the AUTOPAUSE feature of itzg/docker-minecraft-server.
Test instructions
- Change current directory to
examples/autopause. - Build and run.
docker compose up --build - It stops at this message.
[AUTO PAUSE] Paused. (PID:***) - When a client connects or executes a REST API or RCON command, confirm that
[AUTO PAUSE] Wakeup!!! (PID:***)is displayed.
Checklist before requesting a review
- [x] I have performed a self-review/test of my code
- [x] I've added documentation about this change to the docs.
- [x] I've not introduced breaking changes.
- [x] My changes do not violate linting rules.
Thanks for opening this PR, I do need some more time to properly review!
Apologies for the delay, tested and works! Merging!