menu
#5037962 Typed static property WalnutDeveloper\WarriorCore\api\CPS\CPS::$instance must not be accessed before initialization

Submitted by PocketMine-MP 3.22.0

General information

Version: 3.22.0
Git commit: c32c2146
Plugin involvement: Direct
Report date: 2021-07-21 23:48:45 +0000 UTC
Server uptime: 0 days 0 hours 6 minutes 0 seconds

System Information

PHP version: 7.4.15
Operating system: linux
System banner: Linux 801c6511-301c-43aa-8c44-2c468a5a50d5 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64

Error information

Warning: the WarriorCore plugin was directly involved in this crash. Please contact the plugin author.
Message: Typed static property WalnutDeveloper\WarriorCore\api\CPS\CPS::$instance must not be accessed before initialization
File: plugins/WarriorCore.phar/src/WalnutDeveloper/WarriorCore/api/CPS/CPS
Line: #39
Error level: Error
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

class CPS implements Listener{

protected static CPS $instance;

private const ARRAY_MAX_SIZE = 100;

private array $clicksData = [];

public static function getInstance() : CPS { return self::$instance; }

public function initPlayerClickData(Player $player) : void { $this->clicksData[$player->getLowerCaseName()] = []; }

public function addClick(Player $player) : void
{
array_unshift($this->clicksData[$player->getLowerCaseName()], microtime(true));
if(count($this->clicksData[$player->getLowerCaseName()]) >= self::ARRAY_MAX_SIZE){
array_pop($this->clicksData[$player->getLowerCaseName()]);
}
}
#0 plugins/WarriorCore.phar/src/WalnutDeveloper/WarriorCore/Utils(40): WalnutDeveloper\WarriorCore\api\CPS\CPS::getInstance()
#1 plugins/WarriorCore.phar/src/WalnutDeveloper/WarriorCore/task/LevelScoreboard(28): WalnutDeveloper\WarriorCore\Utils::replaceValues(string[0] , object pocketmine\Player)
#2 pmsrc/src/pocketmine/scheduler/TaskHandler(137): WalnutDeveloper\WarriorCore\task\LevelScoreboard->onRun(integer 6861)
#3 pmsrc/src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 6861)
#4 pmsrc/src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 6861)
#5 pmsrc/src/pocketmine/Server(2389): pocketmine\plugin\PluginManager->tickSchedulers(integer 6861)
#6 pmsrc/src/pocketmine/Server(2152): pocketmine\Server->tick()
#7 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
#8 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
#9 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#10 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
#11 pmsrc(11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show