menu
#7304175 Call to a member function setDevice() on null

Submitted by PocketMine-MP 4.6.1

General information

Version: 4.6.1
Git commit: b20e0453
Plugin involvement: Direct
Report date: 2022-08-05 22:31:16 +0000 UTC
Server uptime: 0 days 0 hours 12 minutes 2 seconds

System Information

PHP version: 8.0.19
Operating system: linux
System banner: Linux ubuntu-s-2vcpu-2gb-intel-nyc1-01 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64

Error information

Warning: the AdvancedBan plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function setDevice() on null
File: plugins/AdvancedBan_v1.0.0.phar/src/AdvancedBan/task/async/GenPlayerDataAsync
Line: #40
Error level: Error
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	}

/**
* @return void
*/
public function onCompletion() : void {
$config = SessionFactory::getInstance()->path();
$session = SessionFactory::getInstance()->getSession($this->name);

$session->setDevice(DeviceHelper::_toString($session->getPlayerNonNull()));
$session->setCountry($this->country ?? "Unknown");

$playerData = [
"name" => $session->getPlayerNonNull()->getName(),
"ipv4" => $session->getPlayerNonNull()->getNetworkSession()->getIp(),
"uuid" => $session->getPlayerNonNull()->getUniqueId()->toString(),
"device" => $session->getDevice(),
"country" => $session->getCountry(),
"date" => date("d/m/y H:i:s"),
"elapsed" => microtime(true),
#0 pmsrc/src/scheduler/AsyncPool(268): AdvancedBan\task\async\GenPlayerDataAsync->onCompletion()
#1 pmsrc/src/scheduler/AsyncPool(140): pocketmine\scheduler\AsyncPool->collectTasksFromWorker(int 1)
#2 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\scheduler\AsyncPool->pocketmine\scheduler\{closure}()
#3 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#4 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1659738676.4405)
#5 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#6 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[17] /root/pocketmine/, string[25] /root/pocketmine/plugins/)
#7 pmsrc/src/PocketMine(327): pocketmine\server()
#8 pmsrc(11): require(string[61] phar:///root/pocketmine/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show