menu
#2388072 Call to a member function getPlayerGang() on null

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-05-16 00:37:20 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: linux
System banner: Linux Legends 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the HycadeCore plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getPlayerGang() on null
File: plugins/HycadePSN-master/src/hycade/psn/bossbar/BossBarTask
Line: #43
Error level: Error
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  
public function sendBossBar(){
foreach($this->plugin->getServer()->getOnlinePlayers() as $player){
$name = $player->getName();
$data = $this->plugin->getPlayerData($player);
$color = $data->getRankFormat();
$rank = PlayerData::toString($data->rank);
$next = PlayerData::toString($data->rank+1);
$gangp = Loader::getInstance()->getServer()->getPluginManager()->getPlugin("Gang");
$gang = $gangp->getPlayerGang($player->getName());

if($gang === null){
$text = "[" . $color . $rank . TextFormat::RESET . "]" . "-> [" . $color . $next . TextFormat::RESET . "]" . " || $" . $data->getBeautifedMoney() . " || Gang: NONE";
} else {
$text = "[" . $color . $rank . TextFormat::RESET . "]" . "-> [" . $color . $next . TextFormat::RESET . "]" . " || $" . $data->getBeautifedMoney() . " || Gang: " . $gang;
}
$this->getBossBar()->addBossBar($player);
$this->getBossBar()->setBossBarProgress(20);
$this->getBossBar()->setBossBarTitle($text);
}
#0 plugins/HycadePSN-master/src/hycade/psn/bossbar/BossBarTask(24): hycade\psn\bossbar\BossBarTask->sendBossBar()
#1 src/pocketmine/scheduler/TaskHandler(159): hycade\psn\bossbar\BossBarTask->onRun(integer 1151)
#2 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 1151)
#3 src/pocketmine/plugin/PluginManager(688): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1151)
#4 src/pocketmine/Server(2558): pocketmine\plugin\PluginManager->tickSchedulers(integer 1151)
#5 src/pocketmine/Server(2334): pocketmine\Server->tick()
#6 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1774): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /root/Development/Skyblock/, string /root/Development/Skyblock/plugins/)
#9 (1): require(string phar:///root/Development/Skyblock/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show