Server: remove deprecated parameter from findEntity()

This commit is contained in:
Dylan K. Taylor 2018-08-25 18:38:10 +01:00
parent 3b62926721
commit 5d1ec1ad49

View File

@ -1140,12 +1140,11 @@ class Server{
* Searches all levels for the entity with the specified ID. * Searches all levels for the entity with the specified ID.
* Useful for tracking entities across multiple worlds without needing strong references. * Useful for tracking entities across multiple worlds without needing strong references.
* *
* @param int $entityId * @param int $entityId
* @param Level|null $expectedLevel @deprecated Level to look in first for the target
* *
* @return Entity|null * @return Entity|null
*/ */
public function findEntity(int $entityId, Level $expectedLevel = null){ public function findEntity(int $entityId){
foreach($this->levels as $level){ foreach($this->levels as $level){
assert(!$level->isClosed()); assert(!$level->isClosed());
if(($entity = $level->getEntity($entityId)) instanceof Entity){ if(($entity = $level->getEntity($entityId)) instanceof Entity){