- static getTitle() function of configurator menu interface

- removed reopenMenu() configurator function
- use more intelligent showMenu() function
This commit is contained in:
Steffen Schröder
2014-07-24 23:15:25 +02:00
parent 6138274a98
commit d531d97366
7 changed files with 40 additions and 55 deletions

View File

@ -56,6 +56,13 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_CHANGE_MC_SETTINGS, AuthenticationManager::AUTH_LEVEL_ADMIN);
}
/**
* @see \ManiaControl\Configurators\ConfiguratorMenu::getTitle()
*/
public static function getTitle() {
return self::TITLE;
}
/**
* @see \ManiaControl\Configurators\ConfiguratorMenu::getMenu()
*/
@ -337,14 +344,6 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$this->maniaControl->chat->sendSuccess('Settings saved!', $player);
// Reopen the Menu
$menuId = $this->maniaControl->configurator->getMenuId($this->getTitle());
$this->maniaControl->configurator->reopenMenu($player, $menuId);
}
/**
* @see \ManiaControl\Configurators\ConfiguratorMenu::getTitle()
*/
public function getTitle() {
return self::TITLE;
$this->maniaControl->configurator->showMenu($player, $this);
}
}