Heap of bugfixes, cleanup and PHP 7 upgrades

This commit is contained in:
Dylan K. Taylor
2017-07-13 19:18:56 +01:00
parent c2a7c2c6cd
commit 2a7b736f18
49 changed files with 114 additions and 148 deletions

View File

@ -1170,7 +1170,7 @@ class Server{
}
}
return $this->propertyCache[$variable] === null ? $defaultValue : $this->propertyCache[$variable];
return $this->propertyCache[$variable] ?? $defaultValue;
}
/**
@ -2264,14 +2264,14 @@ class Server{
$pk = new PlayerListPacket();
$pk->type = PlayerListPacket::TYPE_ADD;
$pk->entries[] = [$uuid, $entityId, $name, $skinId, $skinData];
$this->broadcastPacket($players === null ? $this->playerList : $players, $pk);
$this->broadcastPacket($players ?? $this->playerList, $pk);
}
public function removePlayerListData(UUID $uuid, array $players = null){
$pk = new PlayerListPacket();
$pk->type = PlayerListPacket::TYPE_REMOVE;
$pk->entries[] = [$uuid];
$this->broadcastPacket($players === null ? $this->playerList : $players, $pk);
$this->broadcastPacket($players ?? $this->playerList, $pk);
}
public function sendFullPlayerListData(Player $p){