Actually calculate command map and perms async

This commit is contained in:
William Blake Galbreath
2020-04-10 23:16:47 -05:00
parent 94b1df84a7
commit 58c9b01e32

View File

@@ -1,4 +1,4 @@
From 2c4b9f9f107c1da3f2f9d86f13a3ad2bdfab4291 Mon Sep 17 00:00:00 2001
From d9a0a309f8cd883f78c5598a66f05dea6420daa5 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Wed, 8 Apr 2020 23:01:20 -0500
Subject: [PATCH] Async recalc perms and command map
@@ -9,7 +9,7 @@ Subject: [PATCH] Async recalc perms and command map
2 files changed, 15 insertions(+)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 0d985b83d8..eba32e614e 100644
index 0d985b83d8..e0004fb644 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -760,6 +760,15 @@ public abstract class PlayerList {
@@ -18,7 +18,7 @@ index 0d985b83d8..eba32e614e 100644
+ // Purpur start
+ if (net.pl3x.purpur.PurpurConfig.updatePermsAndCommandsAsync) {
+ java.util.concurrent.ForkJoinPool.commonPool().invoke(new java.util.concurrent.RecursiveAction() {
+ java.util.concurrent.ForkJoinPool.commonPool().execute(new java.util.concurrent.RecursiveAction() {
+ protected void compute() {
+ recalculatePermsAndCommands(entityplayer, i);
+ }