Launcher
Launcher copied to clipboard
PostExitCommand runs before totalTimePlayed is updated in instance.cfg
System Information
MultiMC version: 0.6.8 Operating System: OSX/Linux/Windows
Summary of the issue or suggestion:
Update totalTimePlayed in instance.cfg after running commands specified in PostExitCommand
What should happen:
totalTimePlayed should be updated after running anything specified in PostExitCommand
Steps to reproduce the issue (Add more if needed):
- Launch instance
- Close instance
Suspected cause:
PostExitCommand is ran before totalTimePlayed is updated in instance.cfg
Additional Info:
I use a self-hosted git repository to keep my instances directory in sync between several machines, and have been plagued with issues of instance.cfg being out-of-sync, causing a simple git pull in my PreLaunchCommand scripts to fail. I believe that the reason this happens is because totalTimePlayed is stored in-memory until the PostExitCommand finishes running, this is easy to solve with an entry in my .gitignore, but it would be awfully handy to not have to ignore instance.cfg, as then I could simply walk to another machine, git pull, and have any new instances (or instance configs) sync'd to that machine. I believe that there could be two fixes for this issue. One of them would be a switch to disable playtime recording altogether, so the line is never updated, and the other would be to have PostExitCommand run after the playtime has been recorded into instance.cfg. I'm aware that there are other ways to keep directories in sync, such as syncthing, but version controlling via git is a very nice to have feature on mods that have tons of config values. Let me know what you think, or if you need any more information.