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

Unregisters worlds with MV on shutdown. #2150

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Conversation

tastybento
Copy link
Member

@tastybento tastybento commented Jun 27, 2023

Fixes #2149

There is a bug in MV (I think) where it doesn't properly set the generator for a world if it already knows about the world. If the MV config is deleted, after the server is shutdown, or the mv remove command is run on the worlds before shutdown, then everything is okay, but it's a pain for admins to have to run that remove command manually every time.

I think the issue is an MV bug. It used to work but now doesn't and if you reboot your server with AcidIsland for example, you get super flat world generation. I could file a bug with MV, but I'm trying a workaround. I wonder why we don't hear any bugs on this. Maybe MV is not used much nowadays? MyWorlds works fine BTW.

I suspect the incompatibility is because BentoBox loads worlds after Multiverse, so that the generators are unknown (you can see in the log thatMV tries really early) on start up. This seems to cause MV to stop caring about the world and even issuing the mv modify set generator BentoBox command does not work. The generator is just not picked up at all. The only way to force MV to detect it is to remove the world from it via command or just deleting the config.

This "fix" runs the mv remove command on shutdown. As plugins are not allowed to run tasks or commands in onDisable, it has to catch the "stop" or "restart" commands using an event. This works, and it's the only way to do this AFAIK. Not great though.

@tastybento tastybento requested a review from BONNe June 27, 2023 05:10
@haroldrc
Copy link

works?

@tastybento
Copy link
Member Author

works?

Yes. Just need to fix some tests. IRL work is a blocker. Plan TK work on this over the weekend.

Test doesn't do anything though...
@tastybento tastybento merged commit cbed9ac into develop Jun 29, 2023
@tastybento tastybento deleted the mv_remove_on_disable branch June 29, 2023 04:03
@sonarcloud
Copy link

sonarcloud bot commented Jun 29, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

14.7% 14.7% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@haroldrc
Copy link

this error comes at the end of every generation of the world

https://pastebin.com/KY9shApE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiverse Incompatibility - server crash
3 participants