facepalm Do some research. Don't ask generic questions in the development section. Provide code to allow us to help you in the development section. Don't post plugin requests in the development section. I can go on and on...
i tried to use this code to check but it dosent work PHP: public function onPacketReceived(DataPacketReceiveEvent $event){ $packet = $event->getPacket(); if ($packet instanceof LoginPacket) { if (!$packet->identityPublicKey === null) { $player->kick("§l§cﺶﺨﺗ ﻥﺎﺸﻋ xbox ﻲﻓ ﻞﺠﺴﻣ ﻥﻮﻜﺗ ﻡﺯﻻ", false); } }} i tried to use close instead of kick as well but no luck and i did researches in the old and new fourms but i didnt understand anything
You must wait until is fully logged, store somewhere if player is logged to xbox or not and then kick in PlayerLoginEvent or close the event
i tried these two but it dosent work PHP: if ($player->isConnected() && $packet->identityPublicKey === null) { //xbox auth $player->kick("§l§cﺶﺨﺗ ﻥﺎﺸﻋ xbox ﻲﻓ ﻞﺠﺴﻣ ﻥﻮﻜﺗ ﻡﺯﻻ", false);} and PHP: if ($player->loggedIn && $packet->identityPublicKey === null) { //xbox auth $player->kick("§l§cﺶﺨﺗ ﻥﺎﺸﻋ xbox ﻲﻓ ﻞﺠﺴﻣ ﻥﻮﻜﺗ ﻡﺯﻻ", false);} and tried to change to close instead of kick
PHP: public function onPacketReceived(DataPacketReceiveEvent $event){ $packet = $event->getPacket(); if($packet instanceof LoginPacket){ if(!isset($packet->chainData["chain"][2])){ $player->kick("§l§cﺶﺨﺗ ﻥﺎﺸﻋ xbox ﻲﻓ ﻞﺠﺴﻣ ﻥﻮﻜﺗ ﻡﺯﻻ", false); } }}