feedback on settings save

This commit is contained in:
Steffen Schröder 2014-05-16 20:42:37 +02:00
parent 3423bef7a3
commit 1c4d024f4b
4 changed files with 18 additions and 3 deletions

View File

@ -391,6 +391,8 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$this->maniaControl->settingManager->setSetting($oldSetting->class, $oldSetting->setting, $setting['Value']);
}
$this->maniaControl->chat->sendSuccess('Settings saved!', $player);
// Reopen the Menu
$menuId = $this->maniaControl->configurator->getMenuId($this->getTitle());
$this->maniaControl->configurator->reopenMenu($player, $menuId);

View File

@ -457,7 +457,13 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
settype($newSettings[$settingName], gettype($scriptSettings[$settingName]));
}
$this->applyNewScriptSettings($newSettings, $player);
$success = $this->applyNewScriptSettings($newSettings, $player);
if ($success) {
$this->maniaControl->chat->sendSuccess('Script Settings saved!', $player);
} else {
$this->maniaControl->chat->sendError('Script Settings Saving failed!', $player);
}
//Reopen the Menu
$menuId = $this->maniaControl->configurator->getMenuId($this->getTitle());

View File

@ -262,7 +262,12 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
settype($newSettings[$settingName], gettype($serverSettings[$settingName]));
}
$this->applyNewServerSettings($newSettings, $player);
$success = $this->applyNewServerSettings($newSettings, $player);
if ($success) {
$this->maniaControl->chat->sendSuccess('Server Settings saved!', $player);
} else {
$this->maniaControl->chat->sendSuccess('Server Settings Saving failed!', $player);
}
// Reopen the Menu
$menuId = $this->maniaControl->configurator->getMenuId($this->getTitle());

View File

@ -460,6 +460,8 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
$this->maniaControl->settingManager->setSetting($oldSetting->class, $oldSetting->setting, $setting['Value']);
}
$this->maniaControl->chat->sendSuccess('Plugin Settings saved!', $player);
//Reopen the Menu
$menuId = $this->maniaControl->configurator->getMenuId($this->getTitle());
$this->maniaControl->configurator->reopenMenu($player, $menuId);