Added Armor::getCustomColor
This commit is contained in:
parent
a1ec60a194
commit
ac157f2232
1 changed files with 9 additions and 0 deletions
|
|
@ -46,6 +46,15 @@ abstract class Armor extends Item{
|
|||
$this->setCompoundTag($tag);
|
||||
}
|
||||
|
||||
public function getCustomColor(){
|
||||
if(!$this->hasCompoundTag()) return null;
|
||||
$tag = $this->getNamedTag();
|
||||
if(isset($tag->customColor)){
|
||||
return $tag["customColor"];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function clearCustomColor(){
|
||||
if(!$this->hasCompoundTag()) return;
|
||||
$tag = $this->getNamedTag();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue