Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Incorrect nullablility at PlayerMoveEvent.getTo()

Open Brokkonaut opened this issue 2 years ago • 3 comments

Expected behavior

PlayerMoveEvent has subclasses like PlayerTeleportEvent and PlayerPortalEvent where getTo() can return null, so PlayerMoveEvent.getTo() must be nullable.

https://github.com/PaperMC/Paper/blob/master/patches/api/0176-Fix-Spigot-annotation-mistakes.patch#L473

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

Brokkonaut avatar Feb 02 '23 22:02 Brokkonaut