Skip to content

fix: NettyChannelInjector.getPlayer() overwrites TemporaryPlayer with null#3629

Merged
dmulloy2 merged 2 commits into
dmulloy2:masterfrom
NekoEpisode:fix-injector-getplayer
May 31, 2026
Merged

fix: NettyChannelInjector.getPlayer() overwrites TemporaryPlayer with null#3629
dmulloy2 merged 2 commits into
dmulloy2:masterfrom
NekoEpisode:fix-injector-getplayer

Conversation

@NekoEpisode

Copy link
Copy Markdown
Contributor

Bukkit.getPlayerExact() returns null during login phase. Assigning its return value directly to this.player destroys the TemporaryPlayer instance, causing subsequent getPlayer() calls to return null. Use a local variable to only replace the player on success

… null

Bukkit.getPlayerExact() returns null during login phase. Assigning its
return value directly to this.player destroys the TemporaryPlayer instance,
causing subsequent getPlayer() calls to return null. Use a local variable
to only replace the player on success.
@dmulloy2 dmulloy2 enabled auto-merge (squash) May 31, 2026 13:27
@dmulloy2 dmulloy2 merged commit b723ff3 into dmulloy2:master May 31, 2026
3 checks passed
@NekoEpisode NekoEpisode deleted the fix-injector-getplayer branch June 1, 2026 07:55
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.

2 participants