diff options
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 |