menu
#4656767 Typed property Core\utils\ExperienceHandler::$level must not be accessed before initialization

Submitted by PocketMine-MP 3.16.0

General information

Version: 3.16.0
Git commit: d2f68836
Plugin involvement: Direct
Report date: 2020-11-21 21:33:33 +0000 UTC

System Information

PHP version: 7.4.12
Operating system: mac
System banner: Darwin MacBook-Pro-de-Guillaume.local 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64

Error information

Warning: the Core plugin was directly involved in this crash. Please contact the plugin author.
Message: Typed property Core\utils\ExperienceHandler::$level must not be accessed before initialization
File: plugins/pm-core.phar/src/Core/utils/ExperienceHandler
Line: #75
Error level: Error
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    }

public function calculateLevel(): void {
$newLevel = max(1, intval(0.1 * sqrt($this->experience)));

if($this->hasMaxLevel() and $newLevel > $this->maxLevel) {
$newLevel = $this->getMaxLevel();
}

if($this->level !== null and $newLevel > $this->level) {
(new PlayerLevelUpEvent($this->player, $newLevel))->call();
}

$this->level = $newLevel;
}

}
#0 plugins/pm-core.phar/src/Core/utils/ExperienceHandler(24): Core\utils\ExperienceHandler->calculateLevel()
#1 plugins/skywars.phar/src/skywars/SkyWarsPlayer(81): Core\utils\ExperienceHandler->__construct(object skywars\SkyWarsPlayer, integer 0, integer 15)
#2 src/pocketmine/network/mcpe/RakLibInterface(154): skywars\SkyWarsPlayer->__construct(object pocketmine\network\mcpe\RakLibInterface, string[13] 192.168.31.98, integer 58402)
#3 vendor/pocketmine/raklib/src/server/ServerHandler(120): pocketmine\network\mcpe\RakLibInterface->openSession(string[19] 192.168.31.98 58402, string[13] 192.168.31.98, integer 58402, integer -6049730513404922660)
#4 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
#5 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
#6 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
#7 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#8 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1605994413.5194)
#9 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#10 src/pocketmine/Server(1588): pocketmine\Server->start()
#11 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[61] /Users/guillaumeclaverie/OfflineDocs/Projects/Hysland/server/, string[69] /Users/guillaumeclaverie/OfflineDocs/Projects/Hysland/server/plugins/)
#12 src/pocketmine/PocketMine(304): pocketmine\server()
#13 (11): require(string[116] phar:///Users/guillaumeclaverie/OfflineDocs/Projects/Hysland/server/PocketMine-M)

Loaded Plugins

  • Show

Server Settings

  • Show