How is MCPE client id generated ? Is safe to ban a player client ID ? How to get a player client id ?
Well, it's not a good way to ban someone, as you can configure it in a config in your MCPE Folder. And it'll get removed and replaced by UUID (Player::getUniqueID()) - Later will be running over an "Account-System" by Mojang, known from the PC Version of Minecraft.
PHP: public function PreLogin(\pocketmine\event\player\PlayerPreLoginEvent $event){$bannedClientIds = array();//you can type the client ids hereforeach($bannedClientIds as $ci){if($event->getPlayer()->getClientId() == $ci){$event->setKickMessage("You're Banned!");$event->setCancelled(true);}}}
array() resets at the Server restart. I recommend using MySQL, SQL or Files. And, as I said before, it's not that good to use ClientID, as it will be removed soon and is changeable.