PHP: public function onTouch(PlayerInteractEvent $event) { $player = $event->getPlayer(); if(!$player->isOp()) { $event->setCancelled(); }}