PaperMC / PaperMC/Paper

`Player#setPlayerProfile` causing desync issues

Open
#8,728 7 comments 0 reactions 1 assignee View on GitHub

@Owen1212055 is already working on this.

Since Apr 11, 2023.

status: accepted type: bug version: 1.19
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Player#setPlayerProfile to set the player's profile and update the client, while keeping everything else properly synced.

Observed/Actual behavior

Player#setPlayerProfile seems to cause desync issues, for example:
If a player's profile is updated while riding an entity, it'll appear as if they dismounted to them and they'll be able to freely walk around, but once they actually dismount they'll teleport back.
This happens for other things as well, such as leads.

Steps/models to reproduce
  1. Add a plugin that runs player.setPlayerProfile(player.getPlayerProfile()) to a 1.19.3 Paper server (see the test plugin linked below).
  2. Mount a horse.
  3. Trigger that plugin.
Plugin and Datapack List
> plugins
[23:06:30 INFO]: Plugins (1): test
> datapack list
[23:06:55 INFO]: There are 2 data packs enabled: [vanilla (built-in)], [file/bukkit (world)]
[23:06:55 INFO]: There are no more data packs available

No plugins or datapacks other then my test plugin.

Paper version
> version
[23:08:55 INFO]: Checking version, please wait...
[23:08:55 INFO]: This server is running Paper version git-Paper-362 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 52718db)
You are running the latest version
Previous version: git-Paper-360 (MC: 1.19.3)
Other

The plugin I used for testing: https://pastebin.com/1hdqmLw0
A video of the issue:

https://user-images.githubusercontent.com/31237389/209587838-015a8a8f-0262-43f1-9f8a-79c8d3537cf5.mp4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.