InventoryTransactionEvent is not called when an item is simply tapped. Utilize the PlayerInteractEvent instead and check if the item in the player's hand is the one you want to check for. Also, learn PocketMine's API before you attempt to link unrelated events. I would recommend reading the docs at https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/namespaces.html