[SOLVED] If an event is called when an item burns?

Discussion in 'Plugin Development' started by Seadragon91, Feb 8, 2012.

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

    Seadragon91

    Hello!

    I searched for a event that is called, if a item that falls into lava is burnt. I tried it with the events: EntitDeathEvent and ItemDespawnEvent. But both don't work for that. I have no more ideas. Anyone have a idea for me?

    Ty,
    Seadragon91

    bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  2. Offline

    SirTyler

    EntityCombustEvent
     
  3. Offline

    Seadragon91

    Ty very much :D

    Edit: I tested it and it works fine, but the event is called if something/someone is burning and the problem is that it is possible to collect the item before it is removed. I search a event that is called if the item "died", not anymore exists.
     
  4. Offline

    SirTyler

    if(entity instanceof Item)
     
  5. Offline

    Seadragon91

    I used that piece of code. The problem is the item is burning and it needs a little time until is "dead" and then it will be removed, in that time its possible to collect the item and then it is not removed its back in the inventory of the player.
     
  6. Offline

    SirTyler

    entity.remove();

    I am disappointed in peoples lack of javadoc use...
     
  7. Offline

    Seadragon91

    Haven't thought about the idea ,if the event is called, to remove the item. Very nice idea. Ty very much.
     
  8. Offline

    SirTyler

    Your welcome, just try to look at javadocs first before posting xP
     
  9. Offline

    Seadragon91

    Yes ty, I took sometimes lots of time on the javadocs,. but for that I had no idea until now...
     
Thread Status:
Not open for further replies.

Share This Page