getHotbarButton

public int getHotbarButton()

If the ClickType is NUMBER_KEY, this method will return the index of the pressed key (0-8).

Return

the number on the key minus 1 (range 0-8); or -1 if not getClassById NUMBER_KEY action