fixed serversettings
This commit is contained in:
parent
cfbafc8f82
commit
0146a5f4f1
@ -258,11 +258,13 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
|
|
||||||
$prefixLength = strlen(self::ACTION_PREFIX_SETTING);
|
$prefixLength = strlen(self::ACTION_PREFIX_SETTING);
|
||||||
|
|
||||||
|
|
||||||
$newSettings = new ServerOptions();
|
$newSettings = new ServerOptions();
|
||||||
foreach ($configData[3] as $setting) {
|
foreach ($configData[3] as $setting) {
|
||||||
$settingName = substr($setting['Name'], $prefixLength);
|
$settingName = substr($setting['Name'], $prefixLength);
|
||||||
$newSettings->$settingName = $setting['Value'];
|
$dynamicSettingName = lcfirst($settingName);
|
||||||
settype($newSettings->$settingName, gettype($serverSettings[$settingName]));
|
$newSettings->$dynamicSettingName = $setting['Value'];
|
||||||
|
settype($newSettings->$dynamicSettingName, gettype($serverSettings[$settingName]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = $this->applyNewServerSettings($newSettings, $player);
|
$success = $this->applyNewServerSettings($newSettings, $player);
|
||||||
|
Loading…
Reference in New Issue
Block a user