Files
ParchmentMC/patches/api/0007-Expose-MCUtil-Executors.patch
Lexi Larkin 17e63ac792 feat: 1.20.1
2023-06-30 14:54:32 -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 96a267a676b41dc10f7b18ead826e45c5f6db425..4c8b2fa8ee92a4576d8aeea99f488ce88ee6cbc6 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1979,6 +1979,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 {