mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Durable: fix misbehaviour of isBroken() since fe982c697b
(#5436)
this broke tool and armour break sounds.
This commit is contained in:
@ -121,7 +121,7 @@ abstract class Durable extends Item{
|
||||
* Returns whether the item is broken.
|
||||
*/
|
||||
public function isBroken() : bool{
|
||||
return $this->damage >= $this->getMaxDurability();
|
||||
return $this->damage >= $this->getMaxDurability() || $this->isNull();
|
||||
}
|
||||
|
||||
protected function deserializeCompoundTag(CompoundTag $tag) : void{
|
||||
|
Reference in New Issue
Block a user