Solved Detecting exploding snowball

Discussion in 'Plugin Development' started by TheMintyMate, Apr 30, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheMintyMate

    I have recently opened and had a solved thread about how to use config.yml:
    http://forums.bukkit.org/threads/how-to-use-config-yml-in-java-code.261257/
    Continuing with that plugin, I have come across the need to detect when a snowball explodes. From what I have gathered, I would need to use a EntityCombustEvent() , however, I am not sure how to define when a snowball has combusted, and how to locate the snowball combusted area. Lastly, (just to add to this :p ) can you also detect a specified combusting snowball with specific meta data?
    Thank-you for all your help, its greatly appreciated :)
     
  2. Offline

    TryB4

  3. Offline

    TheMintyMate

    TryB4
    *facepalm* Of course! Thanks :p
    Though just one quick question, how would you detect what entity it is? The method is at the tip of my tongue, but I cant remember how to :p Also, and this bit I don't know, how can you obtain (get) the meta data from the exploding entity, aka the snowball. E.g., I set the meta data for the snowball entity to 1. How can I detect if the meta data is 1?
    Thanks :)
     
  4. Offline

    Aqua

    TheMintyMate
    event.getEntityType == EntityType.SOMETHING
    or
    event.getEntity() instanceof Snowball
     
  5. Offline

    TheMintyMate

    Aqua
    Thank-you :)
    I have also found out how to obtain the meat data, so again, thank's guys :)
    Edit: sheesh must be a record for the fastest solved thread :p
     
    TryB4 likes this.
Thread Status:
Not open for further replies.

Share This Page