improvements on plugin load / unload

This commit is contained in:
kremsy
2014-01-18 10:32:33 +01:00
committed by Steffen Schröder
parent 90b0579c17
commit d173a48159
3 changed files with 13 additions and 2 deletions

View File

@@ -134,6 +134,10 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
* Unload the plugin and its resources
*/
public function unload() {
$this->destroyVote();
$emptyManialink = new ManiaLink(self::MLID_ICON);
$manialinkText = $emptyManialink->render()->saveXML();
$this->maniaControl->manialinkManager->sendManialink($manialinkText);
$this->maniaControl->commandManager->unregisterCommandListener($this);
unset($this->maniaControl);
}
@@ -716,6 +720,6 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
* @return string
*/
public static function getDescription() {
return null;
return 'Plugin offers your Custom Votes like Restart, Skip, Balance...';
}
}