Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
修复配置文件中enabled选项不可用的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Crsuh2er0 committed Oct 20, 2022
1 parent 839feb2 commit a870869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void runWorkers() {
Set<String> modules = config.getKeys(false);
modules.remove("version");
modules.removeIf(module -> !Objects.equals(config.getString(String.format("%s.reqMode", module)), "Cycle"));
modules.removeIf(module -> Objects.equals(config.getString(String.format("%s.enabled", module)), "false"));

threadPool = new ThreadPoolExecutor(1, modules.size(),
1L, TimeUnit.SECONDS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public boolean persist() {
@Override
public String onRequest(OfflinePlayer p, @NotNull String params) {
Set<String> modules = config.getKeys(false);
modules.removeIf(module -> Objects.equals(config.getString(String.format("%s.enabled", module)), "false"));
for (String module : modules) {
if (Objects.equals(params, config.getString(String.format("%s.apiname", module)))) {
if ("inTime".equalsIgnoreCase(config.getString(String.format("%s.reqMode", module)))) {
Expand Down

0 comments on commit a870869

Please # to comment.