migrate to new CompoundTag API (#1515)

This commit is contained in:
Dylan K. Taylor
2017-11-10 15:38:21 +00:00
committed by GitHub
parent d4494687d1
commit aa399a1109
20 changed files with 305 additions and 370 deletions

View File

@ -481,9 +481,7 @@ class Item implements ItemIds, \JsonSerializable{
public function getLore() : array{
$display = $this->getNamedTagEntry(self::TAG_DISPLAY);
if($display instanceof CompoundTag and ($lore = $display->getListTag(self::TAG_DISPLAY_LORE)) !== null){
return array_map(function(StringTag $tag) : string{
return $tag->getValue();
}, $lore->getValue());
return $lore->getAllValues();
}
return [];