Skip to content
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

Fix 'Sniper not found' on login #335

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

Aurelien30000
Copy link
Member

Overview

Fixes #326

Description

  • Do not rely on Bukkit Player#isValid method as it can return false for a logging in player under some unknown circumstances.
  • Provide the safe and existing player object to the Sniper when registering and fetch it only when null.
  • Force the player instance to be null when leaving to avoid any potential overlap with the former player instance.

Submitter Checklist

Preview Give feedback

@Aurelien30000 Aurelien30000 added the Bugfix This PR fixes a bug label Dec 15, 2023
@Aurelien30000 Aurelien30000 self-assigned this Dec 15, 2023
@Aurelien30000 Aurelien30000 requested a review from a team as a code owner December 15, 2023 22:29
@NotMyFault
Copy link
Collaborator

@SecretlyJealous do you mind testing this PR, whether it resolves your error reported, please?

Copy link
Member

@OneLiteFeather OneLiteFeather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to replicate the issue but (un)fortunately I couldn't reproduce. @TheMeinerLP and me, we're looking for the circumstances / reasons why isValid behaves this way sometimes (our guess was Configuation Phase, but we had 1.18.2 in the issue as well).

We should get feedback from the reporters if their issue still happens in this branch / update to be on the safe side

Copy link
Collaborator

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll go ahead and merge to the PR due to lack of response of the issue submitter.

@NotMyFault NotMyFault merged commit af90a3b into IntellectualSites:main Dec 22, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnknownSniperPlayerException: Sniper player not found
3 participants