Fix NullPointerException in PlayerInteractEvent#getClickedPosition (#11827)

Fixes a NullPointerException in PlayerInteractEvent#getClickedPosition

Re: https://github.com/EngineHub/CraftBook/issues/1340
This commit is contained in:
Maddy Miller 2024-12-26 18:41:37 +10:00 committed by GitHub
parent 3a479eadd7
commit d85d318951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -241,6 +241,9 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
@Nullable
@Deprecated // Paper
public Vector getClickedPosition() {
if (this.clickedPosistion == null) {
return null;
}
return clickedPosistion.clone();
}