Thaantje Posted May 10, 2015 Share Posted May 10, 2015 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? Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted May 10, 2015 Share Posted May 10, 2015 inventory.getItems()returns an array of itemsindex it with length-1 to get the last Item object if length > 0 then use item.interact() Quote Link to comment Share on other sites More sharing options...
Fruity Posted May 10, 2015 Share Posted May 10, 2015 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 Quote Link to comment Share on other sites More sharing options...
Thaantje Posted May 10, 2015 Author Share Posted May 10, 2015 Thnx guys! gonna try it out p.s.: 100 pc Quote Link to comment Share on other sites More sharing options...