1 thread for cloud

This commit is contained in:
scienziato1pazzo 2025-01-03 21:14:29 +01:00
parent e97cbbc4f8
commit 3d72701d1a
2 changed files with 4 additions and 3 deletions

View File

@ -263,7 +263,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
new ServerLoadEventListener(this);
} catch (final ClassNotFoundException ignored) {
Bukkit.getScheduler()
.runTaskLater(this, () -> getLocalExpansionManager().load(Bukkit.getConsoleSender()), 1);
.runTaskLater(this, () -> getLocalExpansionManager().load(Bukkit.getConsoleSender()), 1L);
}
}

View File

@ -81,8 +81,9 @@ public final class CloudExpansionManager {
private final Map<String, CompletableFuture<File>> await = new ConcurrentHashMap<>();
private final ExecutorService ASYNC_EXECUTOR =
Executors.newCachedThreadPool(
new ThreadFactoryBuilder().setNameFormat("placeholderapi-io-#%1$d").build());
Executors.newSingleThreadExecutor(
new ThreadFactoryBuilder().setNameFormat("placeholderapi-cloud").build()
);
public CloudExpansionManager(@NotNull final PlaceholderAPIPlugin plugin) {
this.plugin = plugin;