clickItem

fun clickItem(name: String, rightClick: Boolean = true, swapBack: Boolean = true): Boolean

Attempts to swap to and click the item containing given name in the hotbar. The same action as on a manual click is performed. so this will prioritise to interact with things instead of using the item ability. returns true if successful, false otherwise.