Solved Endercrystal instanceof ?

Discussion in 'Spigot Plugin Development' started by Pr0Pancakeslol, Sep 12, 2019.

  1. Hey guys,

    I was wondering what Event you use for determining whether a player has punched or shot an arrow and caused an endercrystal to explode.

    I was trying EntitybyEntity , BlockExplode, EntityExplode, Hell i even tried EntityDeathEvent.

    which i don't even know why I tried BlockExplode because I just checked and its showing a crystal as a forsure entity
    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EnderCrystal.html
     
    #1 Pr0Pancakeslol, Sep 12, 2019
    Last edited: Sep 12, 2019
  2. Its the EntityDamageByEntityEvent
    that will cancel this explosion tho if the player hits the entity.
    to cancel the explosion damage go for EntityExplodeEvent
     
    #2 Zdennick, Sep 12, 2019
    Last edited: Sep 12, 2019
  3. Thanks man I tried it last night but I think i setup the instance wrong. Works perfectly now :cool: