Closed inxomnyaa closed 8 years ago
This is indeed an issue PocketMine can try to prevent, but, https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1683 already closes the player, why would a plugin close the player in the first place?
EDIT: @PEMapModder Thanks, this closes some rumors. I don't know, its ReasonWL.
$event->setKickMessage("Timerban");
$event->setCancelled();
and using ->getPlayer()->kick(); instead of $event->setCancelled(); also crashes it. I changed it from playerloginevent to playerjoinevent, also crashes.. but still, thank you :+1: :)
Aaahh.. i know i saw something like that before.. https://github.com/PocketMine/PocketMine-MP/commit/5baa87e9febc7312406e8ca263af292136c01ad4 The crash happens since this branch is merged! Shouldn't the whole thing be near that: https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1832-L1841
@thebigsmileXD Player.php runs $this->close() if PlayerPreLoginEvent or PlayerLoginEvent is cancelled. As for PlayerJoinEvent, it is not cancellable at all.
5baa87e9febc7312406e8ca263af292136c01ad4 doesn't make $this->inventory null. The issue now is that $this->inventory is null.
Dang it, appears that i was on the code of TimerBan xD But well.. there should be a fix for that.
The server crashes when you do
Crash: Fatal error: Call to a member function setHeldItemSlot() on null in phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Player__32bit.php on line 1772
Call Stack: 0.0176 408808 1. {main}() C:\Users\Administrator\Desktop\Server\MinecraftPE\PocketMine-MP\PocketMine-MP.phar:0 0.0199 403904 2. require('phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php') C:\Users\Administrator\Desktop\Server\MinecraftPE\PocketMine-MP\PocketMine-MP.phar:1 0.1494 543960 3. pocketmine\Server->construct() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php:464 15.3231 19858488 4. pocketmine\Server->start() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Server32bit.php:1778 15.3401 19874568 5. pocketmine\Server->tickProcessor() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Server32bit.php:2178 279.9903 19920744 6. pocketmine\Server->tick() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Server32bit.php:2300 279.9905 19920808 7. pocketmine\network\Network->processInterfaces() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Server32bit.php:2485 279.9905 19920808 8. pocketmine\network\RakLibInterface->process() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/network/Network.php:146 279.9905 19920840 9. raklib\server\ServerHandler->handlePacket() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/network/RakLibInterface.php:79 279.9911 19938504 10. pocketmine\network\RakLibInterface->handleEncapsulated() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/raklib/server/ServerHandler32bit.php:90 279.9913 19949336 11. pocketmine\Player->handleDataPacket() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/network/RakLibInterface.php:140 279.9914 19949488 12. pocketmine\network\Network->processBatch() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Player__32bit.php:1597 279.9918 19982912 13. pocketmine\Player->handleDataPacket() phar://C:/Users/Administrator/Desktop/Server/MinecraftPE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/network/Network.php:228
Extends #3574