Incorrect nullablility at PlayerMoveEvent.getTo()
Open
Nobody has claimed this yet.
resolution: awaiting response
type: bug
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
PlayerMoveEvent has subclasses like PlayerTeleportEvent and PlayerPortalEvent where getTo() can return null, so PlayerMoveEvent.getTo() must be nullable.
Observed/Actual behavior
is not
Steps/models to reproduce
Create a handler for a PlayerPortalEvent, check if getTo() returns null and get a warning
Plugin and Datapack List
no
Paper version
yes
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with patches/api/0176-Fix-Spigot-annotation-mistakes.patch around line 473 and inspect PlayerMoveEvent.getTo() together with the PlayerTeleportEvent and PlayerPortalEvent subclasses. Update the nullability annotation so handlers can safely account for a null return, then verify the API warning is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100