aboutsummaryrefslogtreecommitdiff
path: root/features/dataLoader/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'features/dataLoader/index.js')
-rw-r--r--features/dataLoader/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js
index e24c34c..9389c03 100644
--- a/features/dataLoader/index.js
+++ b/features/dataLoader/index.js
@@ -22,6 +22,8 @@ class DataLoader extends Feature {
this.api_loaded_event = this.createCustomEvent("apiLoad")
+ this.loadedApiDatas = {}
+
this.lastApiData = {
"skyblock": undefined,
"player": undefined,
@@ -52,6 +54,12 @@ class DataLoader extends Feature {
let key = this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue()
if(!key) return
+ if(this.loadedApiDatas[type] !== undefined){
+ if(Date.now()-this.loadedApiDatas[type] < 5000) return
+ }
+
+ this.loadedApiDatas[type] = Date.now()
+
if(soopyServer){
}else{