if($event->getBlock()->getId() == Block::TNT){ $event->getBlock()->ignite(); } if($event->getBlock()->getId() == Block::TNT){ $event->setCancelled(); TNT is still normal working. But the block in hand count is not decrease when i placed it.
You still could keep $event->setCancelled() and use PHP: $item = Item::get(46, 0, 1); // TNT (amount: 1)$player->getInventor()->removeItem($item); But the previous method would be the best.