-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
API breakage: Player#loadData()
doesn't load player's world info
#11572
Comments
This generally looks like the documentation fell behind mojangs tweaks and only worked due to CB specific hacks; I'm not really sure if it's viable to properly restore this, I guess maybe we could try to rehack the behavior into the load method, but, this is all around bleh |
@electronicboy, worlds don't have UUIDs on vanilla and are identified by dimension keys, worlds UUIDs are introduced by Spigot (or Bukkit? doesn't matter). So, since I mean, Spigot has indeed brought a lot of weird internal changes to the game, but I don't think this is one of them, at least in the context of |
Except this is not purely API behavior, This is mojang code which is being called into, in which spigot introduced several bugs by the change here, we are not reverting that change, this will need to be solved in a different matter, however, I'm not sure if there is enough will to deal with that |
Related to #9928 (comment) Personally, |
Expected behavior
org.bukkit.entity.Player#loadData()
loads the current location, including world info, like it does on the upstream.Observed/Actual behavior
org.bukkit.entity.Player#loadData()
loads the current location without world info, unlike it does on the upstream.Steps/models to reproduce
Player#loadData()
results inEntity#load(CompoundTag)
call on that player'sServerPlayer
instance, which loads the world info on Paper until1.20.2
build272
and on Spigot.Paper moves the world info loading from
Entity#load(CompoundTag)
toPlayerList#placeNewPlayer(Connection, ServerPlayer, CommonListenerCookie)
since1.20.2
build272
: https://github.com/PaperMC/Paper/blob/d348cb88a9fe8d19e46102c8b9febe18f746d46b/patches/server/0343-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch (the patch was initially included in1.15.2
build202
but did not contain the breaking change initially), soEntity#load(CompoundTag)
and, therefore,Player#loadData()
in the API no longer load information about the player's world, even though the javadoc states that it should (since APILocation
includesWorld
) and it does on the upstream.Plugin and Datapack List
No datapacks. Investigated and identified the issue by comparing relevant Paper and Spigot code. Initially discovered as Jannyboy11/InvSee-plus-plus#105
Paper version
Based on the relevant patch, this should still be an issue on Paper
1.21.3
build11
(latest 1.21.3 build at the time of writing)Other
No response
The text was updated successfully, but these errors were encountered: