vincss / mcEmptyServerStopper

Stop your minecraft server when no one is connected
https://www.spigotmc.org/resources/emptyserverstopper.19409/
47 stars 4 forks source link

Timer isn't stopped when a player joins #11

Closed canthisbe closed 1 year ago

canthisbe commented 1 year ago

Title. For example, last player leaves, starting the hour timer. Someone could join right after but the timer would still be running. That player leaves right before the timer is done, then voila, the server is shutdown despite it being inactive for way less than an hour. Having it so the timer is cancelled when someone joins would be better than checking for a player once the timer is done.

vincss commented 1 year ago

Yes, I already notice that but didn't happen that much, so I kept it that way. Maybe I will try to cancel the timer when someone connect.

vincss commented 1 year ago

Hi, I made a new release, you can give it a try : https://github.com/vincss/mcEmptyServerStopper/releases/tag/v1.1.0

canthisbe commented 1 year ago

Hey, sorry for late response! I've used it and it has worked flawlessly, thank you! Forgot to mention this, but in the previous release, when it detected empty again, it would just create another timer instead of resetting the previous, so multiple timers would run and each timer would check on their respective end. The new release also fixed that issue inherently.