null object access fixed
This commit is contained in:
parent
74658044fc
commit
8d28ccfc2b
@ -248,6 +248,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
|||||||
* @return Frame
|
* @return Frame
|
||||||
*/
|
*/
|
||||||
private function getPluginSettingsMenu(Frame $frame, $width, $height, Paging $paging, Player $player, $settingClass) {
|
private function getPluginSettingsMenu(Frame $frame, $width, $height, Paging $paging, Player $player, $settingClass) {
|
||||||
|
// TODO: use maniacontrolsettings menu
|
||||||
$settings = $this->maniaControl->settingManager->getSettingsByClass($settingClass);
|
$settings = $this->maniaControl->settingManager->getSettingsByClass($settingClass);
|
||||||
|
|
||||||
$pageSettingsMaxCount = 12;
|
$pageSettingsMaxCount = 12;
|
||||||
|
@ -14,12 +14,12 @@ use FML\ManiaLink;
|
|||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
use ManiaControl\Commands\CommandListener;
|
use ManiaControl\Commands\CommandListener;
|
||||||
use ManiaControl\Utils\Formatter;
|
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Manialinks\ManialinkManager;
|
use ManiaControl\Manialinks\ManialinkManager;
|
||||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Players\PlayerManager;
|
use ManiaControl\Players\PlayerManager;
|
||||||
|
use ManiaControl\Utils\Formatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple Stats List Class
|
* Simple Stats List Class
|
||||||
@ -214,6 +214,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
|
|||||||
|
|
||||||
foreach ($statRankings[$order] as $playerId => $value) {
|
foreach ($statRankings[$order] as $playerId => $value) {
|
||||||
$listPlayer = $this->maniaControl->playerManager->getPlayerByIndex($playerId);
|
$listPlayer = $this->maniaControl->playerManager->getPlayerByIndex($playerId);
|
||||||
|
if (!$listPlayer) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($i == 15) {
|
if ($i == 15) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user