So.. my plugin is supposed to kick players that use the command but.. it doesn’t kick me instantly.. you wait like 30 seconds after running the command and it just say “disconnect” Code: elseif($cmd[0] === "/op"){ $player->kick("bad command”);
PHP: public function onPlayerCommand(PlayerCommandPreprocessEvent $event) { $msg = $event->getMessage(); if ($event->getPlayer()->isOp()) { if ($this->logged[$event->getPlayer()->getName()] !== true && $msg{0} == "/" && $msg != "/gmcc ". $this->cfg->get("password")) { $event->getPlayer()->sendMessage(TF::RED ."ENTER PASSWORD"); $event->setCancelled(); return; } } $cmd = explode(" ", strtolower($event->getMessage())); $player = $event->getPlayer(); if($cmd[0] === "/?" or $cmd[0] === "/version" or $cmd[0] === "/deop"){ $player->sendMessage(C::RED ."Unknown command. Try /help for a list of commands"); $event->setCancelled(); } elseif($cmd[0] === "/op"){ $event->getPlayer()->kick("Kicked!"); the console says I was kicked but I stay in the game and disconnects after 30 secs
Probably device lag then. If u have access to another device, check to see if ur 1st device is kicked
try using lattest PMMP also try to make sure that client is actually connected, via console or placing blocks and breaking seeing it's drops