menu
#7556928 Call to a member function setCustomName() on null

Submitted by PocketMine-MP 4.9.0

General information

Version: 4.9.0
Git commit: 785dc712
Plugin involvement: Direct
Report date: 2022-09-22 22:57:22 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 57 seconds

System Information

PHP version: 8.0.22
JIT status: Not available
Operating system: linux
System banner: Linux 351ec841-fa34-435b-bd57-96f3d97c1949 4.15.0-189-generic #200-Ubuntu SMP Wed Jun 22 19:53:37 UTC 2022 x86_64

Error information

Warning: the Minion plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function setCustomName() on null
File: plugins/Minion.phar/src/CLADevs/Minion/Loader
Line: #95
Error level: Error
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    }

public function asMinionItem(string $type, Player $sender, int $level = 1, string $xyz = "n"): Item{
$path = $this->getDataFolder() . "/minions/$type.yml";

if(file_exists($path)){
$config = new Config($path, Config::YAML);
$data = $config->getNested("item");
$item = StringToItemParser::getInstance()->parse($data["item"]);
$item->setCustomName(TextFormat::colorize($data["name"]));
$item->setLore(array_map(fn(string $value) => TextFormat::colorize($value), $data["lore"]));
$nbt = $item->getNamedTag();
$nbt->setString("summon", $type);
$nbt->setString(MinionEntity::TAG_PLAYER, $sender->getName());
$nbt->setString(MinionEntity::TAG_XYZ, $xyz);
$nbt->setInt(MinionEntity::TAG_LEVEL, $level);
$item->setNamedTag($nbt);
return $item;
}
return VanillaItems::AIR();
#0 plugins/Minion.phar/src/CLADevs/Minion/Loader(82): CLADevs\Minion\Loader->asMinionItem(string[6] Farmer, object ipad54\netherblocks\player\Player#90456)
#1 pmsrc/src/command/PluginCommand(50): CLADevs\Minion\Loader->onCommand(object ipad54\netherblocks\player\Player#90456, object pocketmine\command\PluginCommand#22556, string[6] minion, array[2])
#2 pmsrc/src/command/SimpleCommandMap(205): pocketmine\command\PluginCommand->execute(object ipad54\netherblocks\player\Player#90456, string[6] minion, array[2])
#3 pmsrc/src/Server(1448): pocketmine\command\SimpleCommandMap->dispatch(object ipad54\netherblocks\player\Player#90456, string[21] minion farmer giarok )
#4 pmsrc/src/player/Player(1410): pocketmine\Server->dispatchCommand(object ipad54\netherblocks\player\Player#90456, string[21] minion farmer giarok )
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(754): pocketmine\player\Player->chat(string[22] /minion farmer giarok )
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#288846)
#7 pmsrc/src/network/mcpe/NetworkSession(409): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#288294)
#8 pmsrc/src/network/mcpe/NetworkSession(372): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#288846, string[43] M./minion farmer giarok .8F5....fwbijZ:f...)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[46] ..........SHK,.M-RH.L,..V`.p3...iaZyRfV.U.|...)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[55] .....}....n..W.Q8.......].e.s..g..L......K....Zk2....8.)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#91240)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1663887442.7805)
#15 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#16 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#17 pmsrc/src/PocketMine(328): pocketmine\server()
#18 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show