diff --git a/src/pocketmine/item/Durable.php b/src/pocketmine/item/Durable.php index 9ecaff850..a0b580a74 100644 --- a/src/pocketmine/item/Durable.php +++ b/src/pocketmine/item/Durable.php @@ -32,8 +32,7 @@ abstract class Durable extends Item{ * @return bool */ public function isUnbreakable() : bool{ - $tag = $this->getNamedTagEntry("Unbreakable"); - return $tag !== null and $tag->getValue() !== 0; + return $this->getNamedTag()->getByte("Unbreakable", 0) !== 0; } /**