Solved Event for "Destroy Items"

Discussion in 'Spigot Plugin Development' started by Resta2, Jul 8, 2018.

  1. Guys, i have a problem.
    On "Destroy Items" (Shift+mouse click) all items from inventory cleared, and InventoryClickEvent not help!
    Maybe have be event for this action?
    upload_2018-7-8_4-48-35.png
     
  2. I don't know if such thing exists, but I can however tell you that when in creative mode, the server trusts the client a lot more. For example some hacked clients exist that let you cheat in these super overpowered poisons, but it only works in creative. The event you're asking for may not exist simply because the server doesn't care and trusts the client, but I absolutely cannot say for certain.
     
  3. Benz56

    Moderator Supporter

    As @MrDienns mentioned there most likely isn't an event for this.

    I can also confirm that many inventory events behaves differently based on your game mode (survival or creative). What prevents duping in survival may not prevent duping in creative as that game mode allows the player to get any item regardless.

    What are you trying to achieve with such an event?
     
  4. You can use EventDebug to check what events get fired.
     
  5. I am pretty sure that there is some event that gets called because while writing on a plugin I think I got some debug messages I placed on an event.

    But sorry I do not know which one that was. So maybe try out Mareckoo01's method?
    (But I think in order to get called there has to be at least one item in your inventory)
     
  6. I just make a plug-in on the BackPack. And in the creative if you remove all items, they are removed. I read your opinions, and I realized it's better not to. I'll try to do something in the transition to Creative off BackPack, and the transition back to survival included. But I can't say it's Solved.
     
  7. md_5

    Administrator Developer

    InventoryCreativeEvent if anything
     
  8. right now I'll try to check
     
  9. how do I track the removal?
     
  10. Thanks.
    I realized that when this event, I need to check whether the player in the creative, and this Action.

    upload_2018-7-8_5-32-14.png