mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-1733: Add PlayerPickupArrowEvent
By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
75ae03a99d
commit
b93b212047
1 changed files with 27 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue