May 10, 201510 yr Hey All, I can't figure out a way to get every item in my inventory, then select most bottom spot and then interact with it. Any directions?
May 10, 201510 yr inventory.getItems()returns an array of itemsindex it with length-1 to get the last Item object if length > 0 then use item.interact()
May 10, 201510 yr Item[] contents = inventory.getItems(); if (contents.length > 0) { if (inventory.interact("Interact with this shiz", contents[contents.length - 1].toString())); } Something like this i would assume. i have not tested it or anything but you could try it and tell me how it goes! :P
Create an account or sign in to comment