I use this code on task. the player is well kicked but he does not get the message, why? PHP: $kickmsg = "You are kicked";$player->kick($kickmsg, false);
PHP: public function onRun(int $currentTick){ $core = $this->core; foreach($core->getServer()->getOnlinePlayers() as $player){ if($player->getPing() > $core->cfg->get("Max-Ping")){ $kickmsg = $core->getConfig()->get("High-Ping-Message"); $player->kick($kickmsg, false); } } }
PHP: public function onRun(int $currentTick){ $core = $this->core; foreach($core->getServer()->getOnlinePlayers() as $player){ if($player->getPing() > $core->cfg->get("Max-Ping")){ $kickmsg = $core->getConfig()->get("High-Ping-Message"); $player->kick($kickmsg, false); } }
No i dont think but why not. Try whith that: https://github.com/pmmp/PocketMine-...ketmine/event/player/PlayerLoginEvent.php#L50
it shouldn't be possible for him to get the old "race condition" bug. Afaik that very old raklib version is long incompatible with pmmp and there are version checks now.
I have tester myself and I have the same issue but juste when I joining my server and not when I m already connected Tested with the last pmmp commit
English arm: I tested it myself and I have the same issue but just when I join my server and not when I m already connected