Class BlockDispenseArmorEvent

  • All Implemented Interfaces:
    Cancellable

    public class BlockDispenseArmorEvent
    extends BlockDispenseEvent
    Called when an equippable item is dispensed from a block and equipped on a nearby entity.

    If a Block Dispense Armor event is cancelled, the equipment will not be equipped on the target entity.

    • Constructor Detail

      • BlockDispenseArmorEvent

        public BlockDispenseArmorEvent​(@NotNull
                                       Block block,
                                       @NotNull
                                       ItemStack dispensed,
                                       @NotNull
                                       LivingEntity target)
    • Method Detail

      • getTargetEntity

        @NotNull
        public LivingEntity getTargetEntity()
        Get the living entity on which the armor was dispensed.
        Returns:
        the target entity