From 37102c4137ffb3da559238616577d6e91170175b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 16 Jan 2017 23:51:27 +0100 Subject: [PATCH] Add API to set Arrow pickup status By: xGhOsTkiLLeRx --- .../main/java/org/bukkit/entity/Arrow.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Arrow.java b/paper-api/src/main/java/org/bukkit/entity/Arrow.java index e49eef0718..795e40dee2 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Arrow.java +++ b/paper-api/src/main/java/org/bukkit/entity/Arrow.java @@ -39,4 +39,36 @@ public interface Arrow extends Projectile { * @param critical whether or not it should be critical */ public void setCritical(boolean critical); + + /** + * Gets the current pickup status of this arrow. + * + * @return the pickup status of this arrow. + */ + public PickupStatus getPickupStatus(); + + /** + * Sets the current pickup status of this arrow. + * + * @param status new pickup status of this arrow. + */ + public void setPickupStatus(PickupStatus status); + + /** + * Represents the pickup status of this arrow. + */ + public enum PickupStatus { + /** + * The arrow cannot be picked up. + */ + DISALLOWED, + /** + * The arrow can be picked up. + */ + ALLOWED, + /** + * The arrow can only be picked up by players in creative mode. + */ + CREATIVE_ONLY + } }