[SPIGOT-6023] No BlockDispenseEvent is called for several items if the dispenser interacts with an entity Created: 22/Jul/20  Updated: 26/Sep/21  Resolved: 26/Sep/21

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Maartin Assignee: Unassigned
Resolution: Fixed Votes: 4
Labels: Dispenser, Horse, HorseArmor, Llama, Saddle, Strider

Issue Links:
Duplicate
is duplicated by SPIGOT-6700 BlockDispenseArmorEvent not firing on... Closed
Version: CraftBukkit version git-Spigot-0509002-7c03d25 (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

The following actions do not trigger BlockDispenseArmorEvent

  • Dispensing a saddle onto a pig, horse, donkey, mule, or strider
  • Dispensing any of the horse armor types onto a horse
  • Dispensing a carpet onto a llama
  • Dispensing a chest onto a donkey, mule or llama


 Comments   
Comment by TheCreeperCow [ 20/Sep/21 ]

PR is live: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/932

Comment by Maartin [ 20/Sep/21 ]

I think BlockDispenseArmorEvent would make sense

Comment by TheCreeperCow [ 20/Sep/21 ]

Oh no this is not good... Ill be taking a look worst case scenario ill need to add a special handling for each of these special actions.

EDIT: What event would be best for this? The armor event or another new event?

Comment by SolarRabbit [ 09/Aug/21 ]

All the listed actions mentioned above do not spawn any event other than BlockPhysicsEvent, which does not help in handling the entities/items involved in such situations. Tested with the following:
BlockDispenseEvent, BlockDropItemEvent, BlockFromToEvent, BlockReceiveGameEvent, BlockRedstoneEvent, BlockShearEntityEvent

Comment by Black Hole [ 09/Aug/21 ]

Could you test for which of the listed actions no event is called at all?

Comment by SolarRabbit [ 09/Aug/21 ]

Neither is its superclass BlockDispenseEvent called. Or are we implying that there shouldn't be any events called on this type of situations?

Comment by Black Hole [ 23/Jul/20 ]

So the JavaDoc could be improved by adding "armor slot".

Comment by Maartin [ 23/Jul/20 ]

The description for the event is: "Called when an equippable item is dispensed from a block and equipped on a nearby entity". This implies that items such as saddles should call the event.

Comment by Black Hole [ 23/Jul/20 ]

All those are not an armor. The entities are using special slots or just a saddled or chested property.

Generated at Fri Apr 11 15:30:17 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.