From b93b212047f0256fbbc8d4dc3c268807e7277deb Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 22 Mar 2016 17:03:43 -0400 Subject: [PATCH] SPIGOT-1733: Add PlayerPickupArrowEvent By: 2008Choco --- .../event/player/PlayerPickupArrowEvent.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 paper-api/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java new file mode 100644 index 0000000000..97399ed621 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java @@ -0,0 +1,27 @@ +package org.bukkit.event.player; + +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Item; +import org.bukkit.entity.Player; + +/** + * Thrown when a player picks up an arrow from the ground. + */ +public class PlayerPickupArrowEvent extends PlayerPickupItemEvent { + + private final Arrow arrow; + + public PlayerPickupArrowEvent(final Player player, final Item item, final Arrow arrow) { + super(player, item, 0); + this.arrow = arrow; + } + + /** + * Get the arrow being picked up by the player + * + * @return The arrow being picked up + */ + public Arrow getArrow() { + return arrow; + } +}