Skip to content

Conversation

@Timongcraft
Copy link
Contributor

@Timongcraft Timongcraft commented Apr 1, 2025

With this PR, the in 1.21.4 introduced player_loaded packet can be utilised to send/display messages in-game without needing to guess when the player is actually in the world.

This PR only implements the part when the player joins a server, and not the respawn mechanic,
this in my opinion makes sense as there's virtually no reason to fire stuff there on the proxy.

I'm not a fan of having to schedule a task for every player in 1.21.4+, though.

With the current implementation, the proxy waits 1500ms before the event fires as timed out,
which is notchian/paper behaviour, but can be overridden using the velocity.loaded-world-timeout-override system property.

Fixes: #1466

Timongcraft added a commit to Timongcraft/VeloProtocol that referenced this pull request Apr 13, 2025
chore: remove unnecessary mapping entries
chore: update player loaded world api
 -> see PaperMC/Velocity#1541
@Timongcraft Timongcraft force-pushed the feat/loaded-world-api branch from f0bd68a to d39a003 Compare June 19, 2025 12:39
@Timongcraft Timongcraft marked this pull request as ready for review June 19, 2025 12:44
@Timongcraft Timongcraft changed the title WIP: Player Loaded World API Player Loaded World API Jun 19, 2025
@Timongcraft
Copy link
Contributor Author

Timongcraft commented Oct 9, 2025

On another note. I think it could be a good idea to remove the timeout mechanism entirely, as plugins could create a similar mechanism by e.g. scheduling in the ServerPostConnectEvent and storing whether the loaded event triggered.

Edit: We could note that in the javadoc if desired

@Timongcraft Timongcraft force-pushed the feat/loaded-world-api branch from 4f86067 to 1f4b41a Compare October 31, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Player Loaded World API

3 participants