mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Durable: use new CompoundTag API
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user