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