summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/event/block/BlockDispenseArmorEvent.java
blob: c31ce46c192a6f3f62c7534a8cc4dc2ed536a08d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
    }
}