bugfixes
This commit is contained in:
parent
895d500ca6
commit
b04eb30284
@ -189,11 +189,24 @@ class CallbackManager {
|
|||||||
foreach($callbacks as $callback) {
|
foreach($callbacks as $callback) {
|
||||||
$callbackName = $callback[0];
|
$callbackName = $callback[0];
|
||||||
switch($callbackName) {
|
switch($callbackName) {
|
||||||
|
case 'ManiaPlanet.BeginMatch':
|
||||||
|
$titleId = $this->maniaControl->server->titleId;
|
||||||
|
$titlePrefix = strtolower(substr($titleId, 0, 2));
|
||||||
|
if ($titlePrefix != "sm") {
|
||||||
|
$this->triggerCallback($callbackName, $callback);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'ManiaPlanet.BeginMap':
|
case 'ManiaPlanet.BeginMap':
|
||||||
$this->maniaControl->mapManager->handleBeginMap($callback);
|
$this->maniaControl->mapManager->handleBeginMap($callback);
|
||||||
$this->triggerCallback($callbackName, $callback);
|
$this->triggerCallback($callbackName, $callback);
|
||||||
break;
|
break;
|
||||||
case 'ManiaPlanet.EndMatch': //TODO temporary fix
|
case 'ManiaPlanet.EndMatch': //TODO temporary fix
|
||||||
|
$titleId = $this->maniaControl->server->titleId;
|
||||||
|
$titlePrefix = strtolower(substr($titleId, 0, 2));
|
||||||
|
if ($titlePrefix != "sm") {
|
||||||
|
$this->triggerCallback($callbackName, $callback);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'ManiaPlanet.EndMap':
|
case 'ManiaPlanet.EndMap':
|
||||||
$this->maniaControl->mapManager->handleEndMap($callback);
|
$this->maniaControl->mapManager->handleEndMap($callback);
|
||||||
$this->triggerCallback($callbackName, $callback);
|
$this->triggerCallback($callbackName, $callback);
|
||||||
|
@ -288,9 +288,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
/**
|
/**
|
||||||
* Destroy the Vote on Canceled Callback
|
* Destroy the Vote on Canceled Callback
|
||||||
*
|
*
|
||||||
* @param array $callback
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function handleVoteCanceled(array $callback) {
|
public function handleVoteCanceled(Player $player) {
|
||||||
//reset vote
|
//reset vote
|
||||||
$this->destroyVote();
|
$this->destroyVote();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user