There is no such event. You can try checking that with PlayerCommandPreprocessEvent, but it won't work if it is a plugin that banned the player.
so i am disableing ban for ops i know how to do it but i need the event so when ban happens it gets unbanned at the same seccond
Cancel player kick event PHP: public function onKick(PlayerKickEvent $event){if($event->getReason() === '') // Idk what reason is for ban$event->setCancelled(true);} Or automaticly pardon him. PHP: public function onPreLogin(PlayerPreLoginEvent $event){if($event->getPlayer()->isBanned() and $event->getPlayer()->hasPermission('avoid.ban')){$event->getPlayer()->setBanned(false);}}