menu
#7305203 cooldogedev\BedrockEconomy\addon\scorehud\ScoreHudListener::updatePlayerScoreTags(): Argument #1 ($player) must be of type pocketmine\player\Player, null given, called in phar:///home/container/plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/addon/scorehud/ScoreHudListener.php on line 95

Submitted by PocketMine-MP 4.6.1

General information

Version: 4.6.1
Git commit: b20e0453
Plugin involvement: Direct
Report date: 2022-08-06 03:07:00 +0000 UTC
Server uptime: 0 days 0 hours 4 minutes 12 seconds

System Information

PHP version: 8.0.19
Operating system: linux
System banner: Linux 712ec461-9933-4706-becc-58f633a8df00 4.15.0-187-generic #198-Ubuntu SMP Tue Jun 14 03:23:51 UTC 2022 x86_64

Error information

Warning: the BedrockEconomy plugin was directly involved in this crash. Please contact the plugin author.
Message: cooldogedev\BedrockEconomy\addon\scorehud\ScoreHudListener::updatePlayerScoreTags(): Argument #1 ($player) must be of type pocketmine\player\Player, null given, called in phar:///home/container/plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/addon/scorehud/ScoreHudListener.php on line 95
File: plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/addon/scorehud/ScoreHudListener
Line: #99
Error level: TypeError
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    }

private function updateTransaction(array $targets) : void {
foreach ($targets as $player) {
$this->getParent()->updatePlayerCache($player);
$this->updatePlayerScoreTags($this->getParent()->getPlugin()->getServer()->getPlayerExact($player));
}
}

private function updatePlayerScoreTags(Player $player) : void {
(new PlayerTagsUpdateEvent($player, [
new ScoreTag(ScoreHudAddon::SCOREHUD_TAG_BALANCE, $this->getBalanceFormat($this->getParent()->getPlayerCache($player->getName()))),
new ScoreTag(ScoreHudAddon::SCOREHUD_TAG_BALANCE_CAP, $this->getBalanceFormat(($currencyManager = $this->getParent()->getPlugin()->getCurrencyManager())->getBalanceCap())),
new ScoreTag(ScoreHudAddon::SCOREHUD_TAG_CURRENCY_NAME, $currencyManager->getName()),
new ScoreTag(ScoreHudAddon::SCOREHUD_TAG_CURRENCY_SYMBOL, $currencyManager->getSymbol())
]))->call();
}

/**
* Intercepts the tags resolve event and updates the BedrockEconomy tags' value.
#0 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/addon/scorehud/ScoreHudListener(95): cooldogedev\BedrockEconomy\addon\scorehud\ScoreHudListener->updatePlayerScoreTags(null)
#1 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/addon/scorehud/ScoreHudListener(89): cooldogedev\BedrockEconomy\addon\scorehud\ScoreHudListener->updateTransaction(array[1])
#2 pmsrc/src/event/RegisteredListener(60): cooldogedev\BedrockEconomy\addon\scorehud\ScoreHudListener->onTransactionProcess(object cooldogedev\BedrockEconomy\event\transaction\TransactionProcessEvent#105313)
#3 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object cooldogedev\BedrockEconomy\event\transaction\TransactionProcessEvent#105313)
#4 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/transaction/TransactionManager(85): pocketmine\event\Event->call()
#5 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/account/AccountManager(105): cooldogedev\BedrockEconomy\transaction\TransactionManager->processTransaction(object cooldogedev\BedrockEconomy\transaction\types\UpdateTransaction#33917, true)
#6 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/libs/cooldogedev/libSQL/context/ClosureContext(79): cooldogedev\BedrockEconomy\account\AccountManager->cooldogedev\BedrockEconomy\account\{closure}(true, object Closure#126459, null)
#7 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/libs/cooldogedev/libSQL/ConnectionPool(89): cooldogedev\BedrockEconomy\libs\cooldogedev\libSQL\context\ClosureContext->invoke(true, null)
#8 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): cooldogedev\BedrockEconomy\libs\cooldogedev\libSQL\ConnectionPool->cooldogedev\BedrockEconomy\libs\cooldogedev\libSQL\{closure}()
#9 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#10 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1659755220.3191)
#11 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#12 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[16] /home/container/, string[24] /home/container/plugins/)
#13 pmsrc/src/PocketMine(327): pocketmine\server()
#14 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show