menu
#5776688 Declaration of KingOfTurkey38\Crystal\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void

Submitted by PocketMine-MP 4.0.6

General information

Version: 4.0.6
Git commit: f7d25f25
Plugin involvement: Direct
Report date: 2022-01-14 20:05:58 +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 b714fb6d-ed32-427d-9c92-0f9048b9cdab 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Declaration of KingOfTurkey38\Crystal\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
File: plugins/Crystal/src/KingOfTurkey38/Crystal/Main
Line: #14
Error level: E_COMPILE_ERROR
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace KingOfTurkey38\Crystal;

use pocketmine\command\ConsoleCommandSender;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerInteractEvent;
use pocketmine\plugin\PluginBase;

class Main extends PluginBase implements Listener {

public function onEnable()
{
$this->saveDefaultConfig();
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->getServer()->getCommandMap()->register("crystal", new CrystalCommand($this));
}

public function onInteract(PlayerInteractEvent $event): void
{
$item = $event->getItem();

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show