Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.4 - Server Lifecycle Events - Save Events #3533

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

MrNavaStar
Copy link
Contributor

@MrNavaStar MrNavaStar commented Jan 16, 2024

This Pr adds two events (StartSave & EndSave). These events are called when the server starts and stops its periodic saving, as well as when the sever shuts down and when the /save-all command is run.

Common use cases mainly focus on mods that store data in a custom way (custom files, databases, etc) and need a simple way to periodically save data to reduce data loss.

I found myself using these mixins in a lot of my projects, and figured it wouldn't hurt to share them here. Please let me know if you would like any changes or If this pr isn't something your interested in.

Cheers and happy modding!

@modmuss50 modmuss50 added the enhancement New feature or request label Jan 16, 2024
@MrNavaStar
Copy link
Contributor Author

Let me know what other changes you would like, however I wont be able to get to them until tomorrow.

@MrNavaStar MrNavaStar requested a review from modmuss50 January 17, 2024 19:06
@MrNavaStar MrNavaStar changed the title Server Lifecycle Events - Save Events 1.20.4 - Server Lifecycle Events - Save Events Jan 24, 2024
@modmuss50 modmuss50 added the last call If you care, make yourself heard right away! label Feb 8, 2024
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Feb 9, 2024
@modmuss50 modmuss50 merged commit a67ffb5 into FabricMC:1.20.4 Feb 9, 2024
5 checks passed
modmuss50 pushed a commit that referenced this pull request Feb 9, 2024
* Add Server Begin Save and Server End Save event

* rename events

* add tests

* pass more params through

(cherry picked from commit a67ffb5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request last call If you care, make yourself heard right away! merge me please Pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants