menu
#244 Call to a member function getTypeId() on null

Submitted by PocketMine-MP 5.19.1+dev.2067

General information

Version: 5.19.1+dev.2067
Git commit: 8c4e23c4
Plugin involvement: Direct
Report date: 2024-10-26 03:08:10 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 2 seconds

System Information

PHP version: 8.3.4
JIT status: Not available
Operating system: linux
System banner: Linux anmine.ru 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64

Error information

Warning: the GoCore plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Call to a member function getTypeId() on null
File: plugins/GoCore/src/corndan/GoCore/handler/CreativeHandler
Line: #74
Type: Error
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    public static CreativeHandler $instance;

public function __construct(Plugin $plugin)
{
self::$instance = $this;

$config = (new Config(FileSystem::config("items.yml")))->getAll();

foreach ($config['all'] as $name) {
$item = StringToItemParser::getInstance()->parse($name)->getTypeId();
$this->allowed[$item] = $name;
}

foreach ($config['survival'] as $name) {
$item = StringToItemParser::getInstance()->parse($name)->getTypeId();
$this->survivalOnly[$item] = $name;
}

// foreach (VanillaBlocks::getAll() as $item) {
// self::$ACCEPT_BLOCKS[$item->asItem()->getTypeId()] = $item->asItem()->getTypeId();
#0 plugins/GoCore/src/corndan/GoCore/CoreMain(263): corndan\GoCore\handler\CreativeHandler->__construct(object corndan\GoCore\CoreMain#51034)
#1 pmsrc/src/plugin/PluginBase(119): corndan\GoCore\CoreMain->onEnable()
#2 pmsrc/src/plugin/PluginManager(456): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#3 pmsrc/src/Server(1465): pocketmine\plugin\PluginManager->enablePlugin(object corndan\GoCore\CoreMain#51034)
#4 pmsrc/src/Server(1086): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#55819)
#5 pmsrc/src/PocketMine(355): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#2, object pocketmine\utils\MainLogger#6, string[25] /home/anmine/servers/s99/, string[33] /home/anmine/servers/s99/plugins/)
#6 pmsrc/src/PocketMine(378): pocketmine\server()
#7 /home/anmine/startup/tests/PocketMine-MP.phar(168): require(string[72] phar:///tmp/PocketMine-MP-phar-cache.0/PMMPO93Wog.tar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show