diff options
Diffstat (limited to 'features/dataLoader')
-rw-r--r-- | features/dataLoader/index.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js index 43b0f7a..42d0ec5 100644 --- a/features/dataLoader/index.js +++ b/features/dataLoader/index.js @@ -69,12 +69,16 @@ class DataLoader extends Feature { step(){ //2fps this.stats["Area"] = undefined this.stats["Dungeon"] = undefined - TabList.getNames().forEach(n=>{ - n = ChatLib.removeFormatting(n) - if(n.includes(": ")){ - this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() - } - }) + + if(TabList && TabList.getNames()){ + TabList.getNames().forEach(n=>{ + n = ChatLib.removeFormatting(n) + if(n.includes(": ")){ + this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() + } + }) + } + if(this.stats["Dungeon"]){ this.stats["Area"] = this.stats["Dungeon"] this.isInDungeon = true |