temp solved dissapearing widgets, custom ui (reverted from commit 96a0fd8c51d2e362a965aa1fc65bc1eb6226ad8d)
This commit is contained in:
parent
cb1e5b9658
commit
8575e6b291
@ -56,10 +56,10 @@ class CustomUIManager implements CallbackListener, TimerListener {
|
|||||||
*/
|
*/
|
||||||
private function updateManialink(Player $player = null) {
|
private function updateManialink(Player $player = null) {
|
||||||
$manialinkText = $this->customUI->render()->saveXML();
|
$manialinkText = $this->customUI->render()->saveXML();
|
||||||
/*if ($player) {
|
if ($player) {
|
||||||
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login);
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login);
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
$this->maniaControl->manialinkManager->sendManialink($manialinkText);
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,10 +83,6 @@ class CustomUIManager implements CallbackListener, TimerListener {
|
|||||||
*/
|
*/
|
||||||
public function handlePlayerJoined(Player $player) {
|
public function handlePlayerJoined(Player $player) {
|
||||||
$this->updateManialink($player);
|
$this->updateManialink($player);
|
||||||
//send it again after 10 secs
|
|
||||||
$this->maniaControl->timerManager->registerOneTimeListening($this, function($time) use (&$player){
|
|
||||||
$this->updateManialink($player);
|
|
||||||
},5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -204,7 +204,7 @@ class PlayerManager implements CallbackListener, TimerListener {
|
|||||||
|
|
||||||
//Check if Player finished joining the game
|
//Check if Player finished joining the game
|
||||||
if($player->hasJoinedGame && !$prevJoinState){
|
if($player->hasJoinedGame && !$prevJoinState){
|
||||||
//Delay join on 2secs to avoid the non appearing widgets in tm
|
//Delay join on 5secs to avoid the non appearing widgets in tm
|
||||||
$this->maniaControl->timerManager->registerOneTimeListening($this, function($time) use (&$player){
|
$this->maniaControl->timerManager->registerOneTimeListening($this, function($time) use (&$player){
|
||||||
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES) && !$player->isFakePlayer()) {
|
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES) && !$player->isFakePlayer()) {
|
||||||
$string = array(0 => '$0f0Player', 1 => '$0f0Moderator', 2 => '$0f0Admin', 3 => '$0f0SuperAdmin', 4 => '$0f0MasterAdmin');
|
$string = array(0 => '$0f0Player', 1 => '$0f0Moderator', 2 => '$0f0Admin', 3 => '$0f0SuperAdmin', 4 => '$0f0MasterAdmin');
|
||||||
@ -221,7 +221,7 @@ class PlayerManager implements CallbackListener, TimerListener {
|
|||||||
|
|
||||||
// Trigger own PlayerJoined callback
|
// Trigger own PlayerJoined callback
|
||||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_PLAYERCONNECT, $player);
|
$this->maniaControl->callbackManager->triggerCallback(self::CB_PLAYERCONNECT, $player);
|
||||||
}, 1000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger own callback
|
// Trigger own callback
|
||||||
|
@ -158,9 +158,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
$this->updateManialink = false;
|
$this->updateManialink = false;
|
||||||
|
|
||||||
$manialink = $this->buildManialink();
|
$manialink = $this->buildManialink();
|
||||||
if($manialink != ''){
|
$this->maniaControl->manialinkManager->sendManialink($manialink);
|
||||||
$this->maniaControl->manialinkManager->sendManialink($manialink);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -203,10 +201,6 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
if (count($this->maniaControl->playerManager->getPlayers()) == 1) {
|
if (count($this->maniaControl->playerManager->getPlayers()) == 1) {
|
||||||
$this->fetchDedimaniaRecords(true);
|
$this->fetchDedimaniaRecords(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Display the Manialink
|
|
||||||
$manialink = $this->buildManialink();
|
|
||||||
$this->maniaControl->manialinkManager->sendManialink($manialink, $player->login);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -215,6 +209,10 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
var_dump($data);
|
var_dump($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$manialink = $this->buildManialink();
|
||||||
|
$this->maniaControl->manialinkManager->sendManialink($manialink, $player->login);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}, $content, true);
|
}, $content, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user