minor thingys
This commit is contained in:
parent
90124a4c9a
commit
a69d5d0f84
@ -11,7 +11,6 @@ use ManiaControl\Admin\AuthenticationManager;
|
|||||||
use ManiaControl\Formatter;
|
use ManiaControl\Formatter;
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Manialinks\ManialinkManager;
|
use ManiaControl\Manialinks\ManialinkManager;
|
||||||
use Maniaplanet\DedicatedServer\InvalidArgumentException;
|
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,9 +184,8 @@ class PlayerActions {
|
|||||||
// Free player slot
|
// Free player slot
|
||||||
try {
|
try {
|
||||||
$this->maniaControl->client->spectatorReleasePlayerSlot($target->login);
|
$this->maniaControl->client->spectatorReleasePlayerSlot($target->login);
|
||||||
} catch(InvalidArgumentException $e) {
|
} catch(Exception $e) {
|
||||||
//TODO error message from $e
|
//TODO error message from $e
|
||||||
$this->maniaControl->chat->sendError('Error occurred: ' . $this->maniaControl->getClientErrorText(), $admin->login);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ use ManiaControl\Formatter;
|
|||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Manialinks\ManialinkManager;
|
use ManiaControl\Manialinks\ManialinkManager;
|
||||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||||
use Maniaplanet\DedicatedServer\InvalidArgumentException;
|
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -596,7 +595,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
case self::ACTION_SPECTATE_PLAYER:
|
case self::ACTION_SPECTATE_PLAYER:
|
||||||
$this->maniaControl->client->forceSpectator($adminLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
|
$this->maniaControl->client->forceSpectator($adminLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
|
||||||
try {
|
try {
|
||||||
$this->maniaControl->client->forceSpectatorTarget($adminLogin, $targetLogin, 1); //TODO mc crash player is not a spectator
|
$this->maniaControl->client->forceSpectatorTarget($adminLogin, $targetLogin, 1);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
//TODO error message from $e
|
//TODO error message from $e
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,10 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
* @see \ManiaControl\Plugins\Plugin::unload()
|
* @see \ManiaControl\Plugins\Plugin::unload()
|
||||||
*/
|
*/
|
||||||
public function unload() {
|
public function unload() {
|
||||||
|
$emptyManialink = new ManiaLink(self::MLID_DONATE_WIDGET);
|
||||||
|
$manialinkText = $emptyManialink->render()->saveXML();
|
||||||
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText);
|
||||||
|
|
||||||
$this->maniaControl->callbackManager->unregisterCallbackListener($this);
|
$this->maniaControl->callbackManager->unregisterCallbackListener($this);
|
||||||
$this->maniaControl->commandManager->unregisterCommandListener($this);
|
$this->maniaControl->commandManager->unregisterCommandListener($this);
|
||||||
unset($this->maniaControl);
|
unset($this->maniaControl);
|
||||||
|
Loading…
Reference in New Issue
Block a user