PaperMC / PaperMC/Paper

[Request] Player Object Creation Event

Open
#13,176 10 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem?

Recent internal changes in Paper have altered when the Player object becomes available during login.

Libraries like PacketEvents depend on accessing the Player instance as soon as it’s created to attach handlers and initialize player-specific logic.

Currently, there isn’t a consistent point or event that guarantees when the Player object is first created. This makes it difficult to reliably detect that moment across Paper versions without using workarounds.

Describe the solution you'd like.

We would love to have a consistent event that fires the moment the Player object becomes available, regardless of whether that’s before or after login packets are sent.

For example, a PlayerAvailableEvent or PlayerInitEvent that is guaranteed to fire exactly once, as soon as the Player instance exists and is safe to access, would solve this problem completely.

Why this helps:

  • Provides a consistent and predictable hook for libraries and plugins to initialize player object specific logic
  • Removes the need for timing-based workarounds or delayed initialization
  • Keeps compatibility stable even if Paper changes internal login behavior again in the future
Describe alternatives you've considered.

Previously, we relied on an early Paper event to access the Player instance as soon as it was created.
Since that event was removed, the first reliable point to get the Player object is now PlayerJoinEvent.

To work around this, we currently pause the packet encoder once the player has finished logging in and wait until PlayerJoinEvent fires before resuming.
If a new PlayerInitEvent (or similar) were introduced, it might allow us to remove that pause, but even if not, the main benefit would be having a consistent, guaranteed event to rely on across future Paper versions.

Other

No response

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.

Research direction

Start by reviewing the existing PlayerJoinEvent flow and the login path where the Player instance becomes available; the issue does not identify implementation files or tests. Compare that flow with the removed early Paper event and the packet-encoder workaround. Done means a documented event fires exactly once when Player is safe to access, consistently across login timing changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.