Files
ParchmentMC/patches/api/0008-Expose-MCUtil-Executors.patch
Blast-MC 4c2ae38401 1.20.6
2024-05-19 16:31:52 -04:00

34 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: lexikiq <noellekiq@gmail.com>
Date: Sun, 20 Jun 2021 19:39:38 -0400
Subject: [PATCH] Expose MCUtil Executors
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c8595ffcfcbdd79794d464415287d46acef72b72..e018920520c8d747fb10e8365d4dd0326b04c50c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2229,6 +2229,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
UnsafeValues getUnsafe();
+ // Parchment start
+ /**
+ * Gets the executor which runs tasks on an asynchronous thread pool.
+ * @return async executor
+ */
+ @NotNull
+ java.util.concurrent.Executor getAsyncExecutor();
+
+ /**
+ * Gets the executor which runs tasks on the main thread.
+ * @return main executor
+ */
+ @NotNull
+ java.util.concurrent.Executor getMainExecutor();
+ // Parchment end
+
// Spigot start
public class Spigot {