menu
#7304350 Declaration of Heal\Stick\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void

Submitted by PocketMine-MP 4.6.1

General information

Version: 4.6.1
Git commit: b20e0453
Plugin involvement: Direct
Report date: 2022-08-05 23:26:54 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 0 seconds

System Information

PHP version: 8.0.19
Operating system: linux
System banner: Linux 79ab9751-7634-4ee7-87d1-982102321f8a 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 Heal\Stick\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
File: plugins/SoupePourCookie-1.phar/src/Heal/Stick/Main
Line: #10
Error level: E_COMPILE_ERROR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace Heal\Stick;

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

class Main extends PluginBase implements Listener {
public function onEnable() {
$this->getServer()->getPluginManager()->registerEvents($this, $this);
}


public function PlayerInteractEvent(PlayerInteractEvent $event){
if($event->getAction() === PlayerInteractEvent::RIGHT_CLICK_AIR){
if($event->getItem()->getId() === 282) {
$player = $event->getPlayer();
$player->setHealth($player->getHealth() + 10);
$player->sendPopup("§cVous avez été heal!");

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show