menu
#5777356 Declaration of refaltor\FoodEffect\Main::onLoad() must be compatible with pocketmine\plugin\PluginBase::onLoad(): void

Submitted by PocketMine-MP 4.0.5

General information

Version: 4.0.5
Git commit: e7d17eb4
Plugin involvement: Direct
Report date: 2022-01-14 22:52:03 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 0 seconds

System Information

PHP version: 8.0.13
Operating system: linux
System banner: Linux efe9b0a6-3ad1-46f7-adcd-35ca8181fe43 5.10.0-0.bpo.9-amd64 #1 SMP Debian 5.10.70-1~bpo10+1 (2021-10-10) x86_64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Declaration of refaltor\FoodEffect\Main::onLoad() must be compatible with pocketmine\plugin\PluginBase::onLoad(): void
File: plugins/FoodEffect/src/refaltor/FoodEffect/Main
Line: #22
Error level: E_COMPILE_ERROR
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    private static $food;

/** @var Config */
public $config;

public static function getMain(): Main{
return self::$food;
}

public function onLoad(){
@mkdir($this->getDataFolder() . "data/");
}

public function onEnable(): void
{
self::$food = $this;
$this->saveDefaultConfig();
Server::getInstance()->getPluginManager()->registerEvents(new FoodEffect(), $this);
}
}

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show