feedback on settings save
This commit is contained in:
parent
3423bef7a3
commit
1c4d024f4b
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user