menu
#36 Cannot assign string to property corndan\Hub\HubMain::$hubId of type int

Submitted by PocketMine-MP 5.7.1+dev

General information

Version: 5.7.1+dev
Git commit: cf45d0c9
Plugin involvement: Direct
Report date: 2023-12-23 11:11:05 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 0 seconds

System Information

PHP version: 8.2.9
JIT status: Not available
Operating system: linux
System banner: Linux ananasmine.ru 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64

Error information

Warning: the Hub plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Cannot assign string to property corndan\Hub\HubMain::$hubId of type int
File: plugins/Hub.phar/src/corndan/Hub/HubMain
Line: #30
Type: TypeError
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    public static array $data = [];
public static int $online = 0;
public static array $servers = [];
public static int $hubId = -1;
public static array $hubList = [];
public static HubMain $instance;

protected function onEnable(): void
{
self::$hubId = Server::getInstance()->getConfigGroup()->getConfigString("hub-id");
if (self::$hubId === -1) {
Server::getInstance()->getLogger()->critical("UNDEFINED HUB ID");
Server::getInstance()->shutdown();
return;
}
Server::getInstance()->getLogger()->info("HUB " . self::$hubId . " started!");
self::$hubList = json_decode(file_get_contents(FileSystem::settings("hubs.json")), true);
Server::getInstance()->getCommandMap()->register("size", new SizeCommand());
Server::getInstance()->getCommandMap()->register("pos", new PosCommand());
//Server::getInstance()->getCommandMap()->register("transfer", new Transfer());
#0 pmsrc/src/plugin/PluginBase(119): corndan\Hub\HubMain->onEnable()
#1 pmsrc/src/plugin/PluginManager(456): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#2 pmsrc/src/Server(1431): pocketmine\plugin\PluginManager->enablePlugin(object corndan\Hub\HubMain#40526)
#3 pmsrc/src/Server(1065): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#48229)
#4 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[25] /home/anmine/servers/hub/, string[33] /home/anmine/servers/hub/plugins/)
#5 pmsrc/src/PocketMine(357): pocketmine\server()
#6 pmsrc(11): require(string[62] phar:///home/anmine/servers/hub/InCore.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show