onBlockUse

public abstract void onBlockUse(Player player, ItemStack itemStack, Block block, BlockFace blockFace)

Executed when a player right clicks with this item on a block.

Parameters

player

The player who right-clicked.

itemStack

The itemstack that corresponds to this item

block

The block the item was right-clicked on.

blockFace

The blockface the player right-clicked.