PHP: public function Transaction(InventoryTransactionEvent $event){$event->setCancelled(true):} Hello I want to cancel the event if the Player is gamemode 1. Can Someone help me?
PHP: public function onInventoryTransaction(InventoryTransactionEvent $event){ if ($event->getTransaction()->getSource()->getGamemode() === Player::CREATIVE) { $event->setCancelled(true); }}