From 9b59adbfbc07d1923d6e6252693892559e5d124b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 1 May 2018 15:28:26 -0400 Subject: [PATCH] Add Arrow tile methods By: Parker Hawke --- .../src/main/java/org/bukkit/entity/Arrow.java | 18 ++++++++++++++++++ 1 file changed, 18 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 795e40dee..752eeb5e9 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Arrow.java +++ b/paper-api/src/main/java/org/bukkit/entity/Arrow.java @@ -1,5 +1,7 @@ package org.bukkit.entity; +import org.bukkit.block.Block; + /** * Represents an arrow. */ @@ -40,6 +42,22 @@ public interface Arrow extends Projectile { */ public void setCritical(boolean critical); + /** + * Gets whether this arrow is in a block or not. + *

+ * Arrows in a block are motionless and may be picked up by players. + * + * @return true if in a block + */ + public boolean isInBlock(); + + /** + * Gets the block to which this arrow is attached. + * + * @return the attached block or null if not attached + */ + public Block getAttachedBlock(); + /** * Gets the current pickup status of this arrow. *