ReinfyTeam / Zuri

A powerful anticheat made to destroy hackers from your server for PocketMine-MP.
GNU Lesser General Public License v2.1
31 stars 7 forks source link

Call to a member function getName() on null #32

Closed UnknownNull closed 2 months ago

UnknownNull commented 2 months ago

Error: Call to a member function getName() on null File: plugins/Zuri-main/src/listener/PlayerListener Line: 501 Type: Error Backtrace:

#0 plugins/Zuri-main/src/listener/PlayerListener(96): ReinfyTeam\Zuri\listener\PlayerListener->addCPS(object ReinfyTeam\Zuri\player\PlayerAPI#1891318)
#1 pmsrc/src/event/RegisteredListener(61): ReinfyTeam\Zuri\listener\PlayerListener->onDataPacketReceive(object pocketmine\event\server\DataPacketReceiveEvent#2083206)
#2 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketReceiveEvent#2083206)
#3 pmsrc/src/network/mcpe/NetworkSession(541): pocketmine\event\Event->call()
xwertxy commented 2 months ago

I cannot reproduce the issue since the value of $player is must not be null before checking.

https://github.com/ReinfyTeam/Zuri/blob/6efa5420c2fb8d7e3ce6b22ed4d19aaa12ca027e/src/listener/PlayerListener.php#L496-L502

xwertxy commented 2 months ago

Closing this as i seen that it is completed.