palworld-server-docker icon indicating copy to clipboard operation
palworld-server-docker copied to clipboard

add feature/AUTO_PAUSE

Open MusclePr opened this issue 8 months ago • 1 comments

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

  1. Change current directory to examples/autopause.
  2. Build and run. docker compose up --build
  3. It stops at this message. [AUTO PAUSE] Paused. (PID:***)
  4. 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.

MusclePr avatar Apr 10 '25 08:04 MusclePr

Thanks for opening this PR, I do need some more time to properly review!

thijsvanloef avatar Apr 10 '25 08:04 thijsvanloef

Apologies for the delay, tested and works! Merging!

thijsvanloef avatar May 25 '25 12:05 thijsvanloef