mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 15:21:30 +01:00
Fix unknown entity interaction clicked position getter if null
This commit is contained in:
parent
307d05bba8
commit
eb8f2bb2a1
@ -10,7 +10,7 @@ Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..16291c34a87fb0c610a8b2fef10a1899693cb3b8
|
index 0000000000000000000000000000000000000000..a7228e248e3d8eb2e9f011dfe2c7dd9f3f48000f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
||||||
@@ -0,0 +1,82 @@
|
@@ -0,0 +1,82 @@
|
||||||
@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..16291c34a87fb0c610a8b2fef10a1899
|
|||||||
+ * @see org.bukkit.event.player.PlayerInteractAtEntityEvent
|
+ * @see org.bukkit.event.player.PlayerInteractAtEntityEvent
|
||||||
+ */
|
+ */
|
||||||
+ public @Nullable Vector getClickedRelativePosition() {
|
+ public @Nullable Vector getClickedRelativePosition() {
|
||||||
+ return clickedPosition.clone();
|
+ return this.clickedPosition != null ? this.clickedPosition.clone() : null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
|
Loading…
Reference in New Issue
Block a user