Block: return [] instead of null in getMetadata() (return type is non-nullable)

This commit is contained in:
Dylan K. Taylor 2019-12-01 21:02:49 +00:00
parent 4b65e1cbe1
commit 9be95bf263

View File

@ -763,7 +763,7 @@ class Block extends Position implements BlockIds, Metadatable{
return $this->level->getBlockMetadata()->getMetadata($this, $metadataKey);
}
return null;
return [];
}
public function hasMetadata(string $metadataKey) : bool{