jasonw4331 / SimpleReplies

A PocketMine plugins which adds a command to reply to the last person who messaged you
https://poggit.pmmp.io/p/SimpleReplies
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Crash when replying to console #1

Closed AndreasHGK closed 5 years ago

AndreasHGK commented 5 years ago

When you send a message from console and someone replies to this, an error occurs.

Error:

[18:15:56] [Server thread/CRITICAL]: Error: "Call to a member function getDisplayName() on null" (EXCEPTION) in "plugins/SimpleReplies.phar/src/jasonwynn10/SimpleReplies/Main" at line 96
[18:15:56] [Server thread/DEBUG]: #0 src/pocketmine/command/SimpleCommandMap(270): class@anonymousphar:///home/container/plugins/SimpleReplies.phar/src/jasonwynn10/SimpleReplies/Main.php0x7fe01406ddcf->execute(pocketmine\Player object, string reply, array Array())
[18:15:56] [Server thread/DEBUG]: #1 src/pocketmine/Server(2020): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\Player object, string reply thx)
[18:15:56] [Server thread/DEBUG]: #2 src/pocketmine/Player(2231): pocketmine\Server->dispatchCommand(pocketmine\Player object, string reply thx)
[18:15:56] [Server thread/DEBUG]: #3 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(239): pocketmine\Player->chat(string /reply thx)
[18:15:56] [Server thread/DEBUG]: #4 src/pocketmine/network/mcpe/protocol/CommandRequestPacket(54): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleCommandRequest(pocketmine\network\mcpe\protocol\CommandRequestPacket object)
[18:15:56] [Server thread/DEBUG]: #5 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(109): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
[18:15:56] [Server thread/DEBUG]: #6 src/pocketmine/network/mcpe/protocol/BatchPacket(123): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\CommandRequestPacket object)
[18:15:56] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(109): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
[18:15:56] [Server thread/DEBUG]: #8 src/pocketmine/Player(3124): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[18:15:56] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[18:15:56] [Server thread/DEBUG]: #10 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 86.2.128.222 61764, raklib\protocol\EncapsulatedPacket object, integer 0)
[18:15:56] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
[18:15:56] [Server thread/DEBUG]: #12 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
[18:15:56] [Server thread/DEBUG]: #13 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
[18:15:56] [Server thread/DEBUG]: #14 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
[18:15:56] [Server thread/DEBUG]: #15 src/pocketmine/Server(2339): pocketmine\snooze\SleeperHandler->sleepUntil(double 1560017756.9641)
[18:15:56] [Server thread/DEBUG]: #16 src/pocketmine/Server(2196): pocketmine\Server->tickProcessor()
[18:15:56] [Server thread/DEBUG]: #17 src/pocketmine/Server(1775): pocketmine\Server->start()
[18:15:56] [Server thread/DEBUG]: #18 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/container/, string /home/container/plugins/)
[18:15:56] [Server thread/DEBUG]: #19 (1): require(string phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
jasonw4331 commented 5 years ago

Found that it occured because the message receiver logged off. Thanks for the bug report!