Solved Check if chest at location can hold any of current item

Discussion in 'Plugin Development' started by KeylAmi, Mar 26, 2020.

  1. Offline


    I can't find much in the way of answers anywhere else, unless my google-fu is failing me.

    I have a chest that i can reliably place items in via code. However, when the chest is full and wont hold any more, i get nothing.

    How do i check to see if the chest can hold any more?
  2. Offline


  3. Offline


    i thank ya.
    I found another solution browsing the bukkit wiki:

    Map<Integer, ItemStack> noRoom = inv.addItem(i);if (!noRoom.isEmpty()){...}

Share This Page