aboutsummaryrefslogtreecommitdiff
path: root/features/events/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'features/events/index.js')
-rw-r--r--features/events/index.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/features/events/index.js b/features/events/index.js
index 912e566..96a3de0 100644
--- a/features/events/index.js
+++ b/features/events/index.js
@@ -175,12 +175,16 @@ class Events extends Feature {
step_5s(){
if(this.showingWaypoints){
if(this.burrialWaypointsPath.getValue() || this.burrialWaypointsNearest.getValue()){
- new Thread(()=>{
+ new Thread(()=>{ //TODO: make 5head thing to re-use threads
this.updateBurrialPath()
}).start()
}
}
this.sortBurrialLocations()
+
+ if(this.nextUpdateApprox === -2){
+ this.loadApi()
+ }
}
worldLoad(){
@@ -194,13 +198,7 @@ class Events extends Feature {
}
loadApi(){
- new Thread(()=>{
- while(this.nextUpdateApprox === -2){
- this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false)
-
- Thread.sleep(5000)
- }
- }).start()
+ this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false)
}
apiLoad(data, dataType, isSoopyServer, isLatest){