Solved Which event is fired when an armorstand is placed?

Discussion in 'Spigot Plugin Development' started by Jake1996, Jun 30, 2016.

  1. Hi, i thought the BlockPlaceEvent would handle this, but it makes sense why the blockplaceevent wouldnt, considering its an entity.. (Im slow, i didnt even know lol)

    However, ive had a bit of trouble finding the right event for when players spawn entities, since i dont want to block armorstands 100%, just from certain players in a specific gamemode.

    Thx
     
  2. -
    EDIT: Then try using PlayerInteractEvent and checking if the item in their hand is an armorstand.
     
    #2 Javlin, Jun 30, 2016
    Last edited: Jun 30, 2016
  3. I dont think that returns the entity that caused armorstand to spawn, unless ive misunderstood something.
     
  4. You could use the PlayerInteractEvent and just check if the item they are holding is a armor stand

    Edit: i believe you can use EntitySpawnEvent and check if it is instanceof a armor stand (i didn't think about this when i first posted lol)
     
    • Agree Agree x 1
  5. I'll go with the playerinteractevent, ill have a deeper level of control that way (Hopefully) as to who and when someone can use armorstands

    Thx guys :)