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:
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user