Skip to content

Player Loaded World API#1541

Open
Timongcraft wants to merge 16 commits into
PaperMC:dev/4.0.0from
Timongcraft:feat/loaded-world-api
Open

Player Loaded World API#1541
Timongcraft wants to merge 16 commits into
PaperMC:dev/4.0.0from
Timongcraft:feat/loaded-world-api

Conversation

@Timongcraft

@Timongcraft Timongcraft commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

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.

It also does not time out unlike in Paper, but plugins can implement such a behaviour themselves by scheduling a task in ServerPostConnectEvent and checking ServerConnection#isClientLoaded().

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

Timongcraft commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

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
@Timongcraft
Timongcraft force-pushed the feat/loaded-world-api branch from 4e1073a to ada440e Compare May 18, 2026 08:08
@Timongcraft
Timongcraft changed the base branch from dev/3.0.0 to dev/4.0.0 July 12, 2026 15:42
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