BG-Software-LLC / SSB-SlimeWorldManager

An addon for SuperiorSkyblock2 that adds SlimeWorldManager support for worlds management!
21 stars 18 forks source link

Fixes WorldGuard Protection issue #22

Closed CallMeAryan closed 1 year ago

CallMeAryan commented 1 year ago

This PR fixes the ongoing protection issue with worldguard and new islands, should work with all versions as regions are reloaded for particular world on worldLoadEvent

OmerBenGera commented 1 year ago

Please explain first what the issue is and why calling WorldLoadEvent fixes it. Also, it seems for me that ASWM should call it as they are handling the loading of worlds.

tatteaid commented 1 year ago

Should be fixed in #21, this method is called very frequently so there is no need to call the world load event a bunch of times.

CallMeAryan commented 1 year ago

Actually when a new island is created and the world guard regions of that world aren't updating. Calling world load event forces worldguard to reload all the regions.

tatteaid commented 1 year ago

So you only need to do it when the world is created/generated.

CallMeAryan commented 1 year ago

After world is created yes, because the world guard regions. so you can't break anything on island.

tatteaid commented 1 year ago

Then my PR would fix it, the method you're using is called frequently.

OmerBenGera commented 1 year ago

I'd rather go with @tatteaid 's approach as the WorldLoadEvent is called actually when a new world is loaded. Thanks for your contribution!