imprvoement
This commit is contained in:
parent
990b126e4f
commit
4875c14a7d
@ -98,14 +98,16 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// search for matching maps
|
$function = function ($maps) use (&$player) {
|
||||||
$this->maniaControl->mapManager->mxManager->getMapsAssync(function ($maps) use (&$player) {
|
|
||||||
if ($maps == null) {
|
if ($maps == null) {
|
||||||
$this->maniaControl->chat->sendError('No maps found, or MX is down!', $player->login);
|
$this->maniaControl->chat->sendError('No maps found, or MX is down!', $player->login);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->showManiaExchangeList($maps, $player);
|
$this->showManiaExchangeList($maps, $player);
|
||||||
}, $searchString, $author, $environment);
|
};
|
||||||
|
|
||||||
|
// search for matching maps
|
||||||
|
$this->maniaControl->mapManager->mxManager->getMapsAssync($function, $searchString, $author, $environment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user