From eb8f2bb2a183746381738b5ccf08d209efa542b8 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 19 Aug 2023 12:01:06 +1000 Subject: [PATCH] Fix unknown entity interaction clicked position getter if null --- patches/api/0036-Add-PlayerUseUnknownEntityEvent.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/api/0036-Add-PlayerUseUnknownEntityEvent.patch b/patches/api/0036-Add-PlayerUseUnknownEntityEvent.patch index e7e0ef328..61dbf320c 100644 --- a/patches/api/0036-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/api/0036-Add-PlayerUseUnknownEntityEvent.patch @@ -10,7 +10,7 @@ Co-authored-by: Nassim Jahnke 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 -index 0000000000000000000000000000000000000000..16291c34a87fb0c610a8b2fef10a1899693cb3b8 +index 0000000000000000000000000000000000000000..a7228e248e3d8eb2e9f011dfe2c7dd9f3f48000f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java @@ -0,0 +1,82 @@ @@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..16291c34a87fb0c610a8b2fef10a1899 + * @see org.bukkit.event.player.PlayerInteractAtEntityEvent + */ + public @Nullable Vector getClickedRelativePosition() { -+ return clickedPosition.clone(); ++ return this.clickedPosition != null ? this.clickedPosition.clone() : null; + } + + @NotNull