Support for multiple worlds#1
Open
Kryolisc wants to merge 1 commit into
Open
Conversation
Owner
|
Hi, sorry for not replying earlier, this project was kind of on hold. I've changed a few things, as well as I've added support for timezone. If you'd be okay with rebasing your PR, I'd be happy to implement your changes after review! Thanks a lot for contributing <3 |
Owner
|
I'll try to rebase it myself, it doesn't seem too crazy :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've implemented support for multiple worlds as I needed that for a server I maintain. Maybe this would be interesting for somebody else.
This PR restructures the config a bit, so worlds can be added to a list, allowing for per-world config:
Another thing I had to change is the UpdateTimeHandler. It can now be used as a regular object, so multiple instances can be created and run.
Because other worlds besides the "world" are being loaded at some point later in the startup process, the UpdateTimeHandler instances will not be started at plugin load, but instead when the server is done loading. This should ensure that all worlds are loaded and can be found by the plugin.
This version works fine on the before mentioned server (Paper 1.19), but I wasn't able to do extensive testing for other versions.
That said, I also updated the Paper dependency for 1.19 and added the
api-versionproperty to plugins.yml, but that should hardly even matter, as the plugin doesn't really use version-specific APIs.