Avoid Explosions Clearing Items

Discussion in 'Plugin Requests' started by Resoluciones, Nov 17, 2019.

  1. Offline

    Resoluciones

    This is more a question than a plugin request at first, that's why I don't follow the post structure; I would like to know if you know any option to avoid items dissapearing when players are killed because of explosions. I think there is an old plugin for that, but I couldn't find it and I don't remember its name. In case there is no other option, I would request if any of you could make a plugin for that, if case it's possible.

    Thanks!!!!
     
  2. Offline

    DeadSpark143

    You can either turn the gamerule keep inventory to true s(/gamerule keep inventory)y items will be to you even if you die or theres a plugin called die-chests you can use that it keeps your inventory in chests when you die
     
  3. Offline

    Resoluciones

    thanks @DeadSpark143 it's ok for me to drop the items when you die. The problem is that explosions make DISSAPEAR the items, that's what I would like to avoid, in case it's possible.
     
  4. Offline

    DeadSpark143

    If you still want the items to be saved when you die in explosion you can get the Plugin Death Chest it has its preview on overview page itself its nice and easy and also configurable you must go have a look Screenshot_20191118-142150.png
     
  5. Offline

    Resoluciones

    thank you @DeadSpark143 for taking the time to point me to that plugin, I'v downloed it and checked its config, but I don't need any chest with player's items when players die. I just need that when a player is hit by an explosion, its items drop on the ground as if they were hit to death by a zombie or any other death reason and not dissapear (they will dissapear later when caught by garbage collector, but I'm not talking about that).
     
  6. Offline

    RandomUnknown

  7. Offline

    wand555

    What about catching an explosion and its radius, store the Item and check a tick later if the item has gone due to explosion and spawn it again (and vice versa don't do it, when it's still there a tick later)
     
  8. Offline

    RandomUnknown

    The simplest way is to check if "EntityDamageEvent" "EntityType" is "DROPPED_ITEM", and then cancel the event or set the damage to 0. That's what I did in my plugin PreventItemDestruction.
     
    wand555 likes this.
  9. Offline

    wand555

    Ah makes sense, didn't think about that
     
  10. Offline

    Resoluciones

    Thank you for this! I'm testing it in minutes!!!
     

Share This Page