mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
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:
parent
3a479eadd7
commit
d85d318951
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue