Help me check the slot.

Discussion in 'Plugin Development' started by NewMasterBR, Jun 23, 2014.

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

    NewMasterBR

    Staff, good staff these days Hello I was doing an inspired mcpvp called grenadier kit, it is basically a cannon, you click the right button on a slot Dispenser and poe the item that you want to launch. It is this part that enters the doubt. How to check if I do not have any item in this slot and send me a warning message saying that it has "ammo"?
     
  2. NewMasterBR
    Check if the item in the clicked slot is null/air?
    Code:java
    1. if(dispenser_inventory.getItem(clicked_slot) == null) {
     
  3. Offline

    NewMasterBR

    Assist This dispenser_inventory you wanted to refer to the name of my inv right?
     
  4. NewMasterBR
    Yes, and clicked_slot is, never guess, the slot clicked in InventoryClickEvent.
     
Thread Status:
Not open for further replies.

Share This Page