kennytv / Maintenance

Enable maintenance mode on your Minecraft server
https://hangar.papermc.io/kennytv/Maintenance
GNU General Public License v3.0
293 stars 22 forks source link

[Suggestion] Allow using absolute timer values #134

Closed xllifi closed 2 months ago

xllifi commented 2 months ago

"Absolute timer values" means UNIX timestamps.

Current steps to start maintenance at set date:

  1. Get target UNIX timestamp and current UNIX timestamp
  2. Subtract target from current
  3. Divide by 60 and round up
  4. Create a timer (that will still be approximate!!!)

Steps with this feature:

  1. Get target UNIX timestamp
  2. Create a timer (that will be actually precise)
kennytv commented 2 months ago

It'll accept time durations, including 1231237s etc. in seconds now, that's the best I can offer for now. Everything else would make the command a bit confusing or require behavioral breaks, since timestamps don't have any particular identifier