Drop item when inventaire is full

Discussion in 'Plugin Development' started by super_surviveur, Nov 14, 2020.

  1. Offline

    super_surviveur

    Hello,
    I am currently creating a plugin where players can retrieve items from an inventory. I use the addItem() method.
    I'd like items that can't be put in the inventory (if it's full) to fall to the ground but I don't know how to do it.
    Thanks
     
  2. Offline

    CraftCreeper6

    @super_surviveur
    Check if the inventory is full, if it is, use world#dropItemNaturally()
     
  3. Offline

    super_surviveur

Share This Page