menu
#10302552 Declaration of Vanadium\Items\MercureSword::onDestroyBlock(pocketmine\block\Block $block): bool must be compatible with pocketmine\item\Sword::onDestroyBlock(pocketmine\block\Block $block, array &$returnedItems): bool

Submitted by PocketMine-MP 5.11.0

General information

Version: 5.11.0
Git commit: ce8fecc6
Plugin involvement: Direct
Report date: 2024-02-12 18:55:50 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 3 seconds

System Information

PHP version: 8.3.0beta3
JIT status: Not available
Operating system: win
System banner: Windows NT DESKTOP-I2OGMC4 10.0 build 19045 (Windows 10) AMD64

Error information

Warning: the VanaCore plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Declaration of Vanadium\Items\MercureSword::onDestroyBlock(pocketmine\block\Block $block): bool must be compatible with pocketmine\item\Sword::onDestroyBlock(pocketmine\block\Block $block, array &$returnedItems): bool
File: plugins/VanaCore/src/Vanadium/Items/MercureSword
Line: #47
Type: E_COMPILE_ERROR
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
	public function getMiningEfficiency(bool $s): float
{
return parent::getMiningEfficiency($s) * 1.5;
}

protected function getBaseMiningEfficiency() : float{
return 10;
}

public function onDestroyBlock(Block $block) : bool{
if($block->getBreakInfo()->getHardness() > 0){
return $this->applyDamage(2);
}
return false;
}

public function onAttackEntity(Entity $victim) : bool{
return $this->applyDamage(1);
}

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show