mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Durable: use new CompoundTag API
This commit is contained in:
parent
12bbc764ec
commit
eaba105614
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user