menu
#4583309 Call to a member function getPlayers() on null

Submitted by PocketMine-MP 3.15.0

General information

Version: 3.15.0
Git commit: a498b041
Plugin involvement: Direct
Report date: 2020-10-17 23:56:25 +0000 UTC

System Information

PHP version: 7.3.21
Operating system: linux
System banner: Linux HybridPE 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64

Error information

Warning: the DanBamPrison plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getPlayers() on null
File: plugins/DanBamPrison_v1.0.0.phar/src/hybrid/enchants/CloakEnchant
Line: #43
Error level: Error
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
                if ( $hitterChestplate->hasEnchantment( CustomEnchants::CLOAK ) ) {
$cloakLevel = $hitterChestplate->getEnchantmentLevel( CustomEnchants::CLOAK );
$chances = mt_rand( 1, 350 );
if ( $chances <= $cloakLevel ) {
$hitter->sendMessage(Messages::PREFIX."§l§eCloak §r§eenchant has been activated! §l§a+".$cloakLevel." invisibility.");
foreach ($hitter->getLevel()->getPlayers() as $player){
$player->hidePlayer($hitter);
}
MainClass::getInstance()->getScheduler()->scheduleDelayedTask( new ClosureTask( function ( int $currentTick ) use ( $hitter , $cloakLevel): void {
foreach ($hitter->getLevel()->getPlayers() as $player){
$player->showPlayer($hitter);
}
} ), $cloakLevel * 20 );
}
}
}
}
}
}
#0 src/pocketmine/scheduler/ClosureTask(61): hybrid\enchants\CloakEnchant::hybrid\enchants\{closure}(integer 11136)
#1 src/pocketmine/scheduler/TaskHandler(137): pocketmine\scheduler\ClosureTask->onRun(integer 11136)
#2 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 11136)
#3 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 11136)
#4 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 11136)
#5 src/pocketmine/Server(2154): pocketmine\Server->tick()
#6 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1588): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[26] /home/pogi/minecraft/test/, string[34] /home/pogi/minecraft/test/plugins/)
#9 src/pocketmine/PocketMine(304): pocketmine\server()
#10 (11): require(string[81] phar:///home/pogi/minecraft/test/PocketMine-MP.phar/src/pocketmine/PocketMine.ph)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies