PlayerAPI.getHeldItem

Inherited from LivingEntityAPI

Returns an ItemStack representing the item in this entity's main hand
If true is passed in for "offhand",
then it will instead look at the item in the entity's offhand
If the entity isn't holding an item in that hand,
returns air
overload 1:
player:getHeldItem()
Method Property Fluent Description Representation
Return Value an ItemStack
overload 2:
player:getHeldItem(offhand)
Method Property Fluent Description Representation
offhand accepts a Boolean
Return Value an ItemStack
a a