Skip to content

Conversation

@ipkpjersi
Copy link
Contributor

@ipkpjersi ipkpjersi commented Dec 31, 2023

Why was this null? Right clicking player and sending duel request via "Challenge" option produces an NPE, because packet is null, but ChallengePlayer checks packet.getOpcode() value without checking if packet is null first. Dueling, sending a challenge, etc all that still works fine even with an NPE but why have an NPE in the first place?

This closes #639 but is it correct?

Why was this null? Right clicking player and sending duel request via "Challenge" option produces an NPE, because packet is null, but ChallengePlayer checks packet.getOpcode without checking if packet is not null
We don't know if we will receive good data so might as well check it.
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.

Dueling NPE

1 participant