mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isUnbreakable() : bool{
|
public function isUnbreakable() : bool{
|
||||||
$tag = $this->getNamedTagEntry("Unbreakable");
|
return $this->getNamedTag()->getByte("Unbreakable", 0) !== 0;
|
||||||
return $tag !== null and $tag->getValue() !== 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user