Sound::encode() now always returns an array

This commit is contained in:
Dylan K. Taylor
2020-10-31 15:48:46 +00:00
parent 0cbc5c9a4a
commit 5a320f22b7
49 changed files with 102 additions and 105 deletions

View File

@@ -477,9 +477,6 @@ class World implements ChunkManager{
*/
public function addSound(Vector3 $pos, Sound $sound, ?array $players = null) : void{
$pk = $sound->encode($pos);
if(!is_array($pk)){
$pk = [$pk];
}
if(count($pk) > 0){
if($players === null){
foreach($pk as $e){