Skip to content

firstPlayed data corruption issue #389

@OfficialTheosis

Description

@OfficialTheosis

I recently discovered an issue where if a player logs out while you have their inventory open, when you close their inventory, their firstPlayed timestamp will be overwritten with the current time.

Before I realised OpenInv was the culprit, I had the following conversation in PaperMC's Discord server:
Image

As you can see, according to masmc05, who is a Paper contributor, if a plugin is accessing a player's data file directly (which OpenInv must be doing in order to read offline players' inventories), then it can cause this issue.

Steps to reproduce:

  1. Set up a server with two different players' data in the world's playerdata folder.
  2. Take note of Player A's firstPlayed timestamp - this can be viewed with programs like NBTExplorer, inside the bukkit compound tag.
  3. Start the server, and join it with both Player A and Player B.
  4. Have Player B open Player A's inventory.
  5. Log out with Player A.
  6. Close Player A's inventory on Player B.
  7. Observe as Player A's firstPlayed timestamp has been overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions