This mod automatically sets the keepInventory gamerule to true for 30 minutes.
Minutes are easily changed in the config file.
When joining, a message of the remaining minutes is shown.
When 1 minute is remaining, a warning message will be shown.
The time is server side (started upon world creation).
Feel free to use in any curseforge modpack.