diff options
author | Parker Hawke <hawkeboyz2@hotmail.com> | 2018-09-08 00:14:49 -0400 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-09-09 18:46:12 +1000 |
commit | 5466e28123d69eebfccf83e0c29d8eb37be7ec56 (patch) | |
tree | 110df078d881d942884633f64807202fae9869d5 /src | |
parent | 310dc8098d95ca47e8d7f29fdf003757b9dcaace (diff) | |
download | bukkit-5466e28123d69eebfccf83e0c29d8eb37be7ec56.tar bukkit-5466e28123d69eebfccf83e0c29d8eb37be7ec56.tar.gz bukkit-5466e28123d69eebfccf83e0c29d8eb37be7ec56.tar.lz bukkit-5466e28123d69eebfccf83e0c29d8eb37be7ec56.tar.xz bukkit-5466e28123d69eebfccf83e0c29d8eb37be7ec56.zip |
Add BlockDispenseArmorEvent
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/event/block/BlockDispenseArmorEvent.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/block/BlockDispenseArmorEvent.java b/src/main/java/org/bukkit/event/block/BlockDispenseArmorEvent.java new file mode 100644 index 00000000..c31ce46c --- /dev/null +++ b/src/main/java/org/bukkit/event/block/BlockDispenseArmorEvent.java @@ -0,0 +1,37 @@ +package org.bukkit.event.block; + +import org.bukkit.Warning; +import org.bukkit.block.Block; +import org.bukkit.entity.LivingEntity; +import org.bukkit.inventory.ItemStack; +import org.bukkit.util.Vector; + +/** + * Called when an equippable item is dispensed from a block and equipped on a + * nearby entity. + * <p> + * If a Block Dispense Armor event is cancelled, the equipment will not be + * equipped on the target entity. + * + * @deprecated draft API + */ +@Deprecated +@Warning(false) +public class BlockDispenseArmorEvent extends BlockDispenseEvent { + + private final LivingEntity target; + + public BlockDispenseArmorEvent(Block block, ItemStack dispensed, LivingEntity target) { + super(block, dispensed, new Vector(0, 0, 0)); + this.target = target; + } + + /** + * Get the living entity on which the armor was dispensed. + * + * @return the target entity + */ + public LivingEntity getTargetEntity() { + return target; + } +} |