-
Notifications
You must be signed in to change notification settings - Fork 434
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
+60
−0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modmuss50
reviewed
Jan 16, 2024
...vents-v1/src/main/java/net/fabricmc/fabric/api/event/lifecycle/v1/ServerLifecycleEvents.java
Outdated
Show resolved
Hide resolved
...vents-v1/src/main/java/net/fabricmc/fabric/api/event/lifecycle/v1/ServerLifecycleEvents.java
Outdated
Show resolved
Hide resolved
...-events-v1/src/main/java/net/fabricmc/fabric/mixin/event/lifecycle/MinecraftServerMixin.java
Show resolved
Hide resolved
Let me know what other changes you would like, however I wont be able to get to them until tomorrow. |
modmuss50
approved these changes
Jan 28, 2024
Syst3ms
approved these changes
Feb 8, 2024
zOnlyKroks
approved these changes
Feb 8, 2024
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!