imprvoement
This commit is contained in:
parent
990b126e4f
commit
4875c14a7d
@ -98,14 +98,16 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
||||
}
|
||||
}
|
||||
|
||||
// search for matching maps
|
||||
$this->maniaControl->mapManager->mxManager->getMapsAssync(function ($maps) use (&$player) {
|
||||
$function = function ($maps) use (&$player) {
|
||||
if ($maps == null) {
|
||||
$this->maniaControl->chat->sendError('No maps found, or MX is down!', $player->login);
|
||||
return;
|
||||
}
|
||||
$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