Fix for multiverse teleportation problems on a multiworld server (also see thread in Discord server) #53
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.
These changes circumvent a problem where a player does not get their Lobby items when joining a game from a different world using multiverse and multiverse inventories on a multiworld server. The problem has been investigated for a long time already in the Discord server of Plugily. See channel 'Beta-feedback' and Thread: No BuildBattle Lobby items when joining game from different world (Multiworld), for more information.
(https://discord.com/channels/345628548716822530/1058176621045092402/1079051884242931762)
It has been confirmed that these problems exist and these simple code changes resolve the issue without affecting performance on non-multiworld servers. It simply makes the plugin more usable across different types of Minecraft server setups.
The core of these issues lay at multiverse inventories, but since they are not resolving it nor are replying on the PR that was already opened almost 2 years ago, these changes would be very welcome to include within MiniGamesBox. (Multiverse/Multiverse-Inventories#521)
This basically uses completablefuture to see if the teleport is done and wait until that moment to provide the players with the lobby items.
It would be highly appreciated if these changes could be merged into main as after years of waiting I would be finally able to use BuildBattle on my server with mv inventories setup again together with the players.
Thank you so much in advance for your understanding! 😄