Map Restart - Fix tick drift (slow-mo animations)

Plugin Name

MapRestart

Author

Shmitz

GitHub Repository

Description

Restarts a map if no players were connected for a long time to prevent tick drift.

Tick drift is the cause for slow-motion animations in the server.
Changing a map fixes this issue.

if exactly one human is present, the map is reloaded via host_workshop_map <workshopId> (workshop maps) or map <mapName> (built-in maps).

Why is this?
I thought tick misalignment only occurred when no one was on the server, not when at least one person is present.

It restarts the map when a player joins and there has elapsed a configured amount of time since the last time any player was in the server.

Tick drift occurs mostly on empty servers, so that is the main reason why I implemented map restart logic this way.