diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-13 19:14:55 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-13 19:14:55 +0800 |
commit | 2dfbf0cb12dcaebf8dd52b9066fcc70ef6d14f49 (patch) | |
tree | b2a9fc498e4f985d9d81c1ac4f20c1de233c91db /featureClass | |
parent | 30706c85548fda9d9749ca3c5ff6a09f72ffe87f (diff) | |
download | SoopyV2-2dfbf0cb12dcaebf8dd52b9066fcc70ef6d14f49.tar.gz SoopyV2-2dfbf0cb12dcaebf8dd52b9066fcc70ef6d14f49.tar.bz2 SoopyV2-2dfbf0cb12dcaebf8dd52b9066fcc70ef6d14f49.zip |
small fixes
Diffstat (limited to 'featureClass')
-rw-r--r-- | featureClass/featureManager.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js index 92212be..09799c6 100644 --- a/featureClass/featureManager.js +++ b/featureClass/featureManager.js @@ -357,7 +357,12 @@ class FeatureManager { return; } - data = JSON.parse(data) + try { + data = JSON.parse(data) + } catch (e) { + ChatLib.chat(this.messagePrefix + "&cYour settings file corrupted and could not be read! Resetting to defaults.") + data = {} + } this.featureSettingsData = data @@ -541,7 +546,7 @@ class FeatureManager { let event = this.registerCustom("command", func, context) event.trigger.setName(commandName, true) - + if (completions) event.trigger.setName(commandName, true).setTabCompletions(completions) return event |