update callback methods
This commit is contained in:
parent
be5ca8e4ad
commit
d6de80b592
@ -232,21 +232,19 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
/**
|
||||
* Closes the widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
*/
|
||||
public function closeWidget(array $callback) {
|
||||
$player = $callback[1];
|
||||
public function closeWidget(Player $player) {
|
||||
unset($this->adminListShown[$player->login]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset the player if he opened another Main Widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
* @param $openedWidget
|
||||
*/
|
||||
public function handleWidgetOpened(array $callback) {
|
||||
$player = $callback[1];
|
||||
$openedWidget = $callback[2];
|
||||
public function handleWidgetOpened(Player $player, $openedWidget) {
|
||||
//unset when another main widget got opened
|
||||
if ($openedWidget != 'AdminList') {
|
||||
unset($this->adminListShown[$player->login]);
|
||||
|
@ -166,11 +166,10 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
|
||||
/**
|
||||
* Unset the player if he opened another Main Widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
* @param $openedWidget
|
||||
*/
|
||||
public function handleWidgetOpened(array $callback) {
|
||||
$player = $callback[1];
|
||||
$openedWidget = $callback[2];
|
||||
public function handleWidgetOpened(Player $player, $openedWidget) {
|
||||
//unset when another main widget got opened
|
||||
if ($openedWidget != 'Configurator') {
|
||||
unset($this->playersMenuShown[$player->login]);
|
||||
@ -180,10 +179,9 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
|
||||
/**
|
||||
* Widget get closed -> unset player
|
||||
*
|
||||
* @param array $callback
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
*/
|
||||
public function closeWidget(array $callback) {
|
||||
$player = $callback[1];
|
||||
public function closeWidget(Player $player) {
|
||||
unset($this->playersMenuShown[$player->login]);
|
||||
}
|
||||
|
||||
|
@ -307,14 +307,14 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unset the player if he opened another Main Widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
* @param $openedWidget
|
||||
*/
|
||||
public function handleWidgetOpened(array $callback) {
|
||||
$player = $callback[1];
|
||||
$openedWidget = $callback[2];
|
||||
public function handleWidgetOpened(Player $player, $openedWidget) {
|
||||
//unset when another main widget got opened
|
||||
if ($openedWidget != 'ManiaExchangeList') {
|
||||
unset($this->mapListShown[$player->login]);
|
||||
@ -324,10 +324,10 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
||||
/**
|
||||
* Closes the widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
* @internal param array $callback
|
||||
*/
|
||||
public function closeWidget(array $callback) {
|
||||
$player = $callback[1];
|
||||
public function closeWidget(Player $player) {
|
||||
unset($this->mapListShown[$player->login]);
|
||||
}
|
||||
|
||||
|
@ -451,11 +451,10 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
/**
|
||||
* Unset the player if he opened another Main Widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
* @param $openedWidget
|
||||
*/
|
||||
public function handleWidgetOpened(array $callback) {
|
||||
$player = $callback[1];
|
||||
$openedWidget = $callback[2];
|
||||
public function handleWidgetOpened(Player $player, $openedWidget) {
|
||||
//unset when another main widget got opened
|
||||
if ($openedWidget != 'MapList') {
|
||||
unset($this->mapListShown[$player->login]);
|
||||
@ -465,10 +464,9 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
/**
|
||||
* Closes the widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
*/
|
||||
public function closeWidget(array $callback) {
|
||||
$player = $callback[1];
|
||||
public function closeWidget(Player $player) {
|
||||
unset($this->mapListShown[$player->login]);
|
||||
}
|
||||
|
||||
|
@ -598,11 +598,10 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
/**
|
||||
* Unset the player if he opened another Main Widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
* @param $openedWidget
|
||||
*/
|
||||
public function handleWidgetOpened(array $callback) {
|
||||
$player = $callback[1];
|
||||
$openedWidget = $callback[2];
|
||||
public function handleWidgetOpened(Player $player, $openedWidget) {
|
||||
//unset when another main widget got opened
|
||||
if ($openedWidget != 'PlayerList') {
|
||||
unset($this->playersListShown[$player->login]);
|
||||
@ -612,10 +611,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
/**
|
||||
* Closes the widget
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
*/
|
||||
public function closeWidget(array $callback) {
|
||||
$player = $callback[1];
|
||||
public function closeWidget(Player $player) {
|
||||
unset($this->playersListShown[$player->login]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user