bugfixes
This commit is contained in:
parent
895d500ca6
commit
b04eb30284
@ -189,11 +189,24 @@ class CallbackManager {
|
||||
foreach($callbacks as $callback) {
|
||||
$callbackName = $callback[0];
|
||||
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':
|
||||
$this->maniaControl->mapManager->handleBeginMap($callback);
|
||||
$this->triggerCallback($callbackName, $callback);
|
||||
break;
|
||||
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':
|
||||
$this->maniaControl->mapManager->handleEndMap($callback);
|
||||
$this->triggerCallback($callbackName, $callback);
|
||||
|
@ -288,9 +288,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
/**
|
||||
* Destroy the Vote on Canceled Callback
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
*/
|
||||
public function handleVoteCanceled(array $callback) {
|
||||
public function handleVoteCanceled(Player $player) {
|
||||
//reset vote
|
||||
$this->destroyVote();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user