From f92884c36ae61d62853947bc690f1badf9f27d8f Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 30 Mar 2024 12:17:54 +1100 Subject: [PATCH] SPIGOT-7601: Add AbstractArrow#getItem By: md_5 --- .../java/org/bukkit/entity/AbstractArrow.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/AbstractArrow.java b/paper-api/src/main/java/org/bukkit/entity/AbstractArrow.java index 5b50a4e10e..9a0a1fa4b7 100644 --- a/paper-api/src/main/java/org/bukkit/entity/AbstractArrow.java +++ b/paper-api/src/main/java/org/bukkit/entity/AbstractArrow.java @@ -1,6 +1,8 @@ package org.bukkit.entity; import org.bukkit.block.Block; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -124,6 +126,23 @@ public interface AbstractArrow extends Projectile { */ public void setShotFromCrossbow(boolean shotFromCrossbow); + /** + * Gets the ItemStack which will be picked up from this arrow. + * + * @return The picked up ItemStack + */ + @NotNull + @ApiStatus.Experimental + public ItemStack getItem(); + + /** + * Sets the ItemStack which will be picked up from this arrow. + * + * @param item ItemStack set to be picked up + */ + @ApiStatus.Experimental + public void setItem(@NotNull ItemStack item); + /** * Represents the pickup status of this arrow. */