menu
#2907238 Call to a member function getListTag() on null

Submitted by PocketMine-MP 3.9.1

General information

Version: 3.9.1
Git commit: aaa01bb6
Plugin involvement: Direct
Report date: 2019-10-09 21:36:45 +0000 UTC

System Information

PHP version: 7.2.13
Operating system: linux
System banner: Linux ns548060 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64

Error information

Warning: the WorldProtect plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getListTag() on null
File: plugins/WorldProtect.phar/src/aliuly/worldprotect/SaveInventory
Line: #35
Error level: Error
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	private $saveOnDeath = true;

public function __construct(Plugin $plugin) {
parent::__construct($plugin);
$this->saveOnDeath = $plugin->getConfig()->getNested("features")["death-save-inv"] ?? true;
Server::getInstance()->getPluginManager()->registerEvents($this, $this->owner);
}

public function loadInv(Player $player) {
$inventoryTag = $player->namedtag->getListTag("SurvivalInventory");
if(!isset($inventoryTag)) {
if(self::DEBUG) Server::getInstance()->getLogger()->info("[WP Inventory] SurvivalInventory Not Found");
return;
}
if($inventoryTag !== null){
/** @var CompoundTag $item */
foreach($inventoryTag as $i => $item){
$slot = $item->getByte("Slot");
if($slot >= 0 and $slot < 9){ //Hotbar
//Old hotbar saving stuff, ignore it
#0 plugins/WorldProtect.phar/src/aliuly/worldprotect/common/PluginCallbackTask(49): aliuly\worldprotect\SaveInventory->loadInv(object JackMD\NameSpaceRemover\CustomPlayer, object aliuly\worldprotect\common\PluginCallbackTask, integer 181147)
#1 src/pocketmine/scheduler/TaskHandler(159): aliuly\worldprotect\common\PluginCallbackTask->onRun(integer 181147)
#2 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 181147)
#3 src/pocketmine/plugin/PluginManager(689): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 181147)
#4 src/pocketmine/Server(2569): pocketmine\plugin\PluginManager->tickSchedulers(integer 181147)
#5 src/pocketmine/Server(2345): pocketmine\Server->tick()
#6 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1784): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[10] /home/hub/, string[18] /home/hub/plugins/)
#9 (1): require(string[65] phar:///home/hub/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show