Help needed, how to check if inventory is full

Discussion in 'Plugin Development' started by deadbeat91, Feb 13, 2011.

Thread Status:
Not open for further replies.
  1. Currently making my server a small money plugin for buying and selling which all works well but i would like to check if the inventory is full before giving them an item.

    so a simple if statement will do just can't think of it right now

    if(check inventory ! full)
    {

    }
    else
    {
    playersendMessage(invntory full)
    }

    hope someone can help :)
     
  2. Offline

    Afforess

    inventory.firstEmpty() == -1

    First empty returns the first empty slot in the inventory, but if it is full will return -1.
     
  3. thanks afforess much appreciated now i can validate my plugin :p
     
Thread Status:
Not open for further replies.

Share This Page