Skip to content

WIP: Player Loaded World API #1541

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

Draft
wants to merge 4 commits into
base: dev/3.0.0
Choose a base branch
from

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 is not finished, and more to better discuss feature and implementation details. (see below)

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.

But with the current implementation the proxy only waits 1500ms before the event fires as timeouted,
this is notchian/paper behaviour but isn't particularly useful in my opinion as in my testing the 1500ms were frequently not enough (note that in my testing I used ServerPostConnectEvent as starting point). However, because the client doesn't actually enforce this timeout and sends the packet regardless, we could set our own timing.

Also, I'm not exactly sure where we would start to count for the timeout and how to handle it.

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
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
1 participant