diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupArrowEvent.java new file mode 100644 index 00000000..97399ed6 --- /dev/null +++ b/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; + } +} |