@@ -57,7 +57,6 @@ |
||
| 57 | 57 | * @param DataCollectionFactory $dataCollectionFactory |
| 58 | 58 | * @param GridBuilderFactory $gridBuilderFactory |
| 59 | 59 | * @param ChatCommandDataProvider $chatCommandDataProvider |
| 60 | - * @param Connection $connection |
|
| 61 | 60 | * @param AdminGroups $adminGroups |
| 62 | 61 | */ |
| 63 | 62 | public function __construct( |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use eXpansion\Framework\Core\Services\Console; |
| 8 | 8 | use eXpansion\Framework\Core\Services\DedicatedConnection\Factory; |
| 9 | 9 | use eXpansion\Framework\Core\Storage\PlayerStorage; |
| 10 | -use Maniaplanet\DedicatedServer\Connection; |
|
| 11 | 10 | use Maniaplanet\DedicatedServer\InvalidArgumentException; |
| 12 | 11 | use Maniaplanet\DedicatedServer\Xmlrpc\UnknownPlayerException; |
| 13 | 12 | use Psr\Log\LoggerInterface; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use eXpansion\Framework\Core\Services\Application; |
| 8 | 8 | use eXpansion\Framework\Core\Services\DedicatedConnection\Factory; |
| 9 | 9 | use eXpansion\Framework\Core\Storage\PlayerStorage; |
| 10 | -use Maniaplanet\DedicatedServer\Connection; |
|
| 11 | 10 | use Maniaplanet\DedicatedServer\Structures\PlayerInfo; |
| 12 | 11 | |
| 13 | 12 | /** |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use eXpansion\Framework\Core\Services\DedicatedConnection\Factory; |
| 13 | 13 | use eXpansion\Framework\Core\Storage\Data\Player; |
| 14 | 14 | use eXpansion\Framework\GameManiaplanet\DataProviders\Listener\ListenerInterfaceMpLegacyPlayer; |
| 15 | -use Maniaplanet\DedicatedServer\Connection; |
|
| 16 | 15 | use oliverde8\AssociativeArraySimplified\AssociativeArray; |
| 17 | 16 | use Psr\Log\LoggerInterface; |
| 18 | 17 | |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | $size = strlen($mlData['ml']); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $logins = array_filter($mlData['logins'], function ($value) { |
|
| 167 | + $logins = array_filter($mlData['logins'], function($value) { |
|
| 168 | 168 | return $value != ''; |
| 169 | 169 | }); |
| 170 | 170 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $this->console->getSfStyleOutput()->error( |
| 91 | 91 | [ |
| 92 | 92 | "Looks like your Dedicated server is either offline or has wrong config settings", |
| 93 | - "Error message: " . $lastExcelption->getMessage() |
|
| 93 | + "Error message: ".$lastExcelption->getMessage() |
|
| 94 | 94 | ] |
| 95 | 95 | ); |
| 96 | 96 | $this->logger->error("Unable to open connection for Dedicated server", ["exception" => $lastExcelption]); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | ] |
| 149 | 149 | ); |
| 150 | 150 | } |
| 151 | - } while($attempts < $maxAttempts && !is_null($lastExcelption)); |
|
| 151 | + } while ($attempts < $maxAttempts && !is_null($lastExcelption)); |
|
| 152 | 152 | |
| 153 | 153 | return $lastExcelption; |
| 154 | 154 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | try { |
| 114 | - $currentMap = $this->factory->getConnection()->getCurrentMapInfo(); // sync better |
|
| 114 | + $currentMap = $this->factory->getConnection()->getCurrentMapInfo(); // sync better |
|
| 115 | 115 | } catch (\Exception $e) { |
| 116 | 116 | // fallback to use map storage |
| 117 | 117 | $currentMap = $this->mapStorage->getMapByIndex($curMapIndex); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | try { |
| 131 | - $nextMap = $this->factory->getConnection()->getNextMapInfo(); // sync better |
|
| 131 | + $nextMap = $this->factory->getConnection()->getNextMapInfo(); // sync better |
|
| 132 | 132 | } catch (\Exception $e) { |
| 133 | 133 | // fallback to use map storage |
| 134 | 134 | $nextMap = $this->mapStorage->getMapByIndex($nextMapIndex); |
@@ -2,21 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace eXpansion\Bundle\VoteManager\Plugins; |
| 4 | 4 | |
| 5 | -use eXpansion\Bundle\Maps\Services\JukeboxService; |
|
| 6 | 5 | use eXpansion\Bundle\VoteManager\Plugins\Gui\Widget\UpdateVoteWidgetFactory; |
| 7 | 6 | use eXpansion\Bundle\VoteManager\Plugins\Gui\Widget\VoteWidgetFactory; |
| 8 | 7 | use eXpansion\Bundle\VoteManager\Plugins\Votes\AbstractVotePlugin; |
| 9 | 8 | use eXpansion\Bundle\VoteManager\Services\VoteService; |
| 10 | 9 | use eXpansion\Bundle\VoteManager\Structures\Vote; |
| 11 | 10 | use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpTimer; |
| 12 | -use eXpansion\Framework\Core\Helpers\ChatNotification; |
|
| 13 | 11 | use eXpansion\Framework\Core\Model\UserGroups\Group; |
| 14 | -use eXpansion\Framework\Core\Services\Console; |
|
| 15 | 12 | use eXpansion\Framework\Core\Storage\Data\Player; |
| 16 | -use eXpansion\Framework\Core\Storage\MapStorage; |
|
| 17 | 13 | use eXpansion\Framework\GameManiaplanet\DataProviders\Listener\ListenerInterfaceMpLegacyVote; |
| 18 | -use eXpansion\Framework\GameManiaplanet\DataProviders\Listener\ListenerInterfaceMpScriptPodium; |
|
| 19 | -use Maniaplanet\DedicatedServer\Connection; |
|
| 20 | 14 | |
| 21 | 15 | class VoteManager implements ListenerInterfaceMpLegacyVote, ListenerInterfaceExpTimer |
| 22 | 16 | { |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | public static function getSubscribedEvents() |
| 57 | 57 | { |
| 58 | 58 | return [ |
| 59 | - 'maniaplanet.game.BeginMap' => 'onManiaplanetGameBeginMap' , |
|
| 59 | + 'maniaplanet.game.BeginMap' => 'onManiaplanetGameBeginMap', |
|
| 60 | 60 | Factory::EVENT_CONNECTED => 'onConnectionToDedicated' |
| 61 | 61 | ]; |
| 62 | 62 | } |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | * @param $config |
| 86 | 86 | * @param $manialink |
| 87 | 87 | * @param $element |
| 88 | - * @param $width |
|
| 89 | - * @param $manialinkFactory |
|
| 88 | + * @param double $width |
|
| 89 | + * @param ManialinkFactory $manialinkFactory |
|
| 90 | 90 | * |
| 91 | 91 | * @return \eXpansion\Framework\Gui\Layouts\LayoutLine |
| 92 | 92 | */ |
@@ -102,6 +102,10 @@ discard block |
||
| 102 | 102 | ->setAction( |
| 103 | 103 | $this->actionFactory->createManialinkAction( |
| 104 | 104 | $manialink, |
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * @param double $args |
|
| 108 | + */ |
|
| 105 | 109 | function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
| 106 | 110 | /** @var TextListConfig $config */ |
| 107 | 111 | $config = $args['config']; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use eXpansion\Framework\Config\Model\ConfigInterface; |
| 6 | 6 | use eXpansion\Framework\Config\Model\TextListConfig; |
| 7 | -use eXpansion\Framework\Config\Ui\Window\ConfigWindowFactory; |
|
| 8 | 7 | use eXpansion\Framework\Core\Model\Gui\ManialinkInterface; |
| 9 | 8 | use eXpansion\Framework\Core\Plugins\Gui\ActionFactory; |
| 10 | 9 | use eXpansion\Framework\Core\Plugins\Gui\ManialinkFactory; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ->setAction( |
| 58 | 58 | $this->actionFactory->createManialinkAction( |
| 59 | 59 | $manialink, |
| 60 | - function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 60 | + function(ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 61 | 61 | /** @var TextListConfig $config */ |
| 62 | 62 | $config = $args['config']; |
| 63 | 63 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | ) |
| 72 | 72 | ); |
| 73 | 73 | |
| 74 | - $elements = [$this->uiFactory->createLayoutLine(0,0, [$input, $addButton])]; |
|
| 74 | + $elements = [$this->uiFactory->createLayoutLine(0, 0, [$input, $addButton])]; |
|
| 75 | 75 | foreach ($config->get() as $element) { |
| 76 | 76 | $elements[] = $this->getElementLine($config, $manialink, $element, $width, $manialinkFactory); |
| 77 | 77 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ->setAction( |
| 103 | 103 | $this->actionFactory->createManialinkAction( |
| 104 | 104 | $manialink, |
| 105 | - function (ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 105 | + function(ManialinkInterface $manialink, $login, $entries, $args) use ($manialinkFactory) { |
|
| 106 | 106 | /** @var TextListConfig $config */ |
| 107 | 107 | $config = $args['config']; |
| 108 | 108 | $config->remove($args['element']); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | ) |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - return $this->uiFactory->createLayoutLine(0,0, [$label, $delButton]); |
|
| 116 | + return $this->uiFactory->createLayoutLine(0, 0, [$label, $delButton]); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |