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

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

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

    KeylAmi

    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

    CraftCreeper6

  3. Offline

    KeylAmi

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

    Map<Integer, ItemStack> noRoom = inv.addItem(i);if (!noRoom.isEmpty()){...}
     
Thread Status:
Not open for further replies.

Share This Page