menu
#9718473 room17\SkyBlock\utils\Utils::parseItem(): Argument #1 ($item) must be of type array, int given

Submitted by PocketMine-MP 5.8.1

General information

Version: 5.8.1
Git commit: 75a39491
Plugin involvement: Direct
Report date: 2023-12-03 04:12:32 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 1 seconds

System Information

PHP version: 8.1.24
JIT status: Not available
Operating system: linux
System banner: Linux 7d01757fd6bb 5.15.0-84-generic #93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023 x86_64

Error information

Warning: the SkyBlock plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: room17\SkyBlock\utils\Utils::parseItem(): Argument #1 ($item) must be of type array, int given
File: plugins/SkyBlock.phar/src/room17/SkyBlock/utils/Utils
Line: #27
Type: TypeError
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

class Utils {

public static function parseItems(array $items): array {
return array_filter(array_map("self::parseItem", $items), function($value) {
return $value != null;
});
}

public static function parseItem(array $item): ?Item {
$itemName = $item[0] ?? "";
$itemCount = intval($item[1] ?? 1);

$item = StringToItemParser::getInstance()->parse($itemName);
$item?->setCount($itemCount);

return $item;
}

public static function translateColors(string $message): string {
#0 (): room17\SkyBlock\utils\Utils::parseItem(int 30)
#1 plugins/SkyBlock.phar/src/room17/SkyBlock/utils/Utils(22): array_map(string[15] self::parseItem, array[1])
#2 plugins/SkyBlock.phar/src/room17/SkyBlock/SkyBlockSettings(97): room17\SkyBlock\utils\Utils::parseItems(array[1])
#3 plugins/SkyBlock.phar/src/room17/SkyBlock/SkyBlockSettings(34): room17\SkyBlock\SkyBlockSettings->initialize()
#4 plugins/SkyBlock.phar/src/room17/SkyBlock/SkyBlock(53): room17\SkyBlock\SkyBlockSettings->__construct(object room17\SkyBlock\SkyBlock#44834)
#5 pmsrc/src/plugin/PluginBase(119): room17\SkyBlock\SkyBlock->onEnable()
#6 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#7 pmsrc/src/Server(1391): pocketmine\plugin\PluginManager->enablePlugin(object room17\SkyBlock\SkyBlock#44834)
#8 pmsrc/src/Server(1034): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#44776)
#9 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[8] /server/, string[16] /server/plugins/)
#10 pmsrc/src/PocketMine(357): pocketmine\server()
#11 pmsrc(11): require(string[45] phar:///server/server.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show