menu
#5777047 Declaration of DeadBush\snowball\snow::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 21:33:57 +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 21429888c820 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Declaration of DeadBush\snowball\snow::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
File: plugins/Snowball.phar/src/DeadBush/snowball/snow
Line: #16
Error level: E_COMPILE_ERROR
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\item\Item;
use pocketmine\event\entity\EntityDamageByChildEntityEvent;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\entity\projectile\Snowball;
use pocketmine\utils\Config;

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

public function onDamage(EntityDamageEvent $event) {
if($event instanceof EntityDamageByChildEntityEvent){
$child = $event->getChild();
$player = $event->getEntity();
if($child instanceof Snowball) {
$mhealth = ($this->getConfig()->get("hearts"));

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show