mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Shears: fixed always-false hardness check
thanks PHPStan
This commit is contained in:
@ -48,7 +48,7 @@ class Shears extends Tool{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onDestroyBlock(Block $block) : bool{
|
public function onDestroyBlock(Block $block) : bool{
|
||||||
if($block->getHardness() === 0 or $block->isCompatibleWithTool($this)){
|
if($block->getHardness() === 0.0 or $block->isCompatibleWithTool($this)){
|
||||||
return $this->applyDamage(1);
|
return $this->applyDamage(1);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user