1.14.4 Know how an item spawns

Discussion in 'Spigot Plugin Development' started by FrenchInhale, Mar 4, 2020.

  1. Hello everyone !

    I'm looking for a way to know how an item spawns and I can't find.
    Let me explain : if we take an apple for exemple, it can spawns :
    - by a player drop
    - by a leaf break by a player
    - by a leaf that disappear after breaking the wood of the tree
    - by a dispenser
    - ...

    And I want to know the way it spawns.

    I haven't find anything with the event list so if anybody has an idea I'll be glad
     
  2. ItemSpawnEvent

    The sad thing is, that there is no Spawn Cause available.
    Suggestion: Create a PR on Stash



    For leaf -> leafDecayEvent
    Payer -> PlayerItmeDropEvent
    Block -> BlockDropItemEvent
     
  3. For Player drops you always have the PlayerDropItemEvent
    for others i have no clue
     
  4. I'll try those event, is there one for a dispenser drop ?
    And I'm not sure to know what Stash is.
     
  5. Thank you anyway, I'll try to find that
     
  6. BlockDispenseEvent