Skip to content

Commit

Permalink
Fix missing uses of SF executors
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Feb 15, 2025
1 parent fbb0ad6 commit eef10ab
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public SoulFireServer(
loadInstances();

var rpcServerStart =
CompletableFuture.runAsync(
scheduler.runAsync(
() -> {
try {
rpcServer.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CompletableFuture<MinecraftAccount> login(MSBedrockCredentialsAuthData da
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down Expand Up @@ -77,7 +77,7 @@ public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, SFP
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CompletableFuture<MinecraftAccount> login(MSBedrockDeviceCodeAuthData dat
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand All @@ -65,7 +65,7 @@ public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, SFP
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CompletableFuture<MinecraftAccount> login(MSJavaCredentialsAuthData data,
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down Expand Up @@ -77,7 +77,7 @@ public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, SFP
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CompletableFuture<MinecraftAccount> login(MSJavaDeviceCodeAuthData data,
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand All @@ -65,7 +65,7 @@ public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, SFP
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public CompletableFuture<MinecraftAccount> login(MSJavaRefreshTokenAuthData data
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand All @@ -64,7 +64,7 @@ public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, SFP
} catch (Exception e) {
throw new CompletionException(e);
}
});
}, executor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public SFUpdateChecker() {
}

public static CompletableFuture<SFUpdateChecker> getInstance(SoulFireServer server) {
return CompletableFuture.supplyAsync(
return server.scheduler().supplyAsync(
() -> {
if (instance == null) {
instance = new SFUpdateChecker();
}

return instance;
}, server.scheduler());
});
}

private static String checkForUpdates() {
Expand Down

0 comments on commit eef10ab

Please sign in to comment.