menu
#7862607 Call to a member function getName() on null

Submitted by PocketMine-MP 4.10.1

General information

Version: 4.10.1
Git commit: a39938e6
Plugin involvement: Direct
Report date: 2022-11-24 14:21:51 +0000 UTC
Server uptime: 0 days 0 hours 18 minutes 49 seconds

System Information

PHP version: 8.0.24
JIT status: Disabled
Operating system: linux
System banner: Linux ba125be8-8850-4d3a-bd2d-5b3ed7a2b6eb 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64

Error information

Warning: the LunarCore plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getName() on null
File: plugins/ProSkyCoreV1_3.phar/src/Lunar/Core/LunarCore
Line: #155
Error level: Error
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
            $gems->set("Gems", $this->gemsMoney[$player->getName()]);
$gems->save();
}
}


public function giveGemsBalance(string $player, float $amount): void
{
$player = $this->getServer()->getPlayerExact($player);
$name = $player->getName();
if ($player instanceof Player && isset($this->gemsMoney[$name]) && is_numeric($this->gemsMoney[$name])) {
$this->gemsMoney[$name] = $this->gemsMoney[$name] + $amount;
} else {
$gems = new Config($this->getDataFolder() . "Data/" . $name . ".yml", Config::YAML);
$gems->set("Gems", $gems->get("Gems") + $amount);
$gems->save();
}
$event = new PlayerGemsBalChangeEvent($player, strval($this->getGemsBalance($player->getName())));
$event->call();
}
#0 plugins/ProSkyCoreV1_3.phar/src/Lunar/Core/Commands/GemsCommand(33): Lunar\Core\LunarCore->giveGemsBalance(null, float 9999999)
#1 pmsrc/src/command/SimpleCommandMap(205): Lunar\Core\Commands\GemsCommand->execute(object Stats\player\MagicPlayer#107765, string[4] gems, array[3])
#2 pmsrc/src/Server(1448): pocketmine\command\SimpleCommandMap->dispatch(object Stats\player\MagicPlayer#107765, string[20] gems add pro 9999999)
#3 pmsrc/src/player/Player(1437): pocketmine\Server->dispatchCommand(object Stats\player\MagicPlayer#107765, string[20] gems add pro 9999999)
#4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(754): pocketmine\player\Player->chat(string[21] /gems add pro 9999999)
#5 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#134197)
#6 pmsrc/src/network/mcpe/NetworkSession(410): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#150187)
#7 pmsrc/src/network/mcpe/NetworkSession(373): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#134197, string[42] M./gems add pro 9999999..C.*......6..9....)
#8 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[41] ....OO.-VHLIQ((.W........fL..x.c..l.+....)
#9 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[50] .4}.`...U...Q..W_..>.5..;..-NT^&......n_...$....k.)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#27630)
#11 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#13 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1669299711.831)
#14 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#15 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#16 pmsrc/src/PocketMine(328): pocketmine\server()
#17 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show