mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Actually calculate command map and perms async
This commit is contained in:
@@ -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>
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Wed, 8 Apr 2020 23:01:20 -0500
|
Date: Wed, 8 Apr 2020 23:01:20 -0500
|
||||||
Subject: [PATCH] Async recalc perms and command map
|
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(+)
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/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 {
|
@@ -760,6 +760,15 @@ public abstract class PlayerList {
|
||||||
@@ -18,7 +18,7 @@ index 0d985b83d8..eba32e614e 100644
|
|||||||
|
|
||||||
+ // Purpur start
|
+ // Purpur start
|
||||||
+ if (net.pl3x.purpur.PurpurConfig.updatePermsAndCommandsAsync) {
|
+ 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() {
|
+ protected void compute() {
|
||||||
+ recalculatePermsAndCommands(entityplayer, i);
|
+ recalculatePermsAndCommands(entityplayer, i);
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
Reference in New Issue
Block a user