mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: a4f066cc Fix method profiler inbalance introduced in a2a9ffe (#3132) c65dcad3 Don't delay chunk unloads during entity ticking bc17ce69 Delay unsafe actions until after entity ticking is done - Fixes #3114 5553e6b3 Disable Sync Events firing Async errors during shutdown e12c51d9 Use better variable for isStopping() API 586ee2bb Remove patch for MC-111480, fixed in 1.14 09a94215 Remove streams from Mob AI System bb5c294e Fix Disabling Asynchronous Chunks 089d8356 Implement Chunk Priority / Urgency System for World Gen fce69af7 Use dedicated thread for main thread blocking chunk loads 588b62e4 Add tick times API and /mspt command (#3102) 11de41c7 Add API MinecraftServer#isStopping (#3129) 942ff3c2 My patches are under MIT (#3130)
This commit is contained in:
55
patches/server/0112-Async-recalc-perms-and-command-map.patch
Normal file
55
patches/server/0112-Async-recalc-perms-and-command-map.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From f9dedbe5901d9cdfcee2616910fbe9b985bca3cf 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
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 10 ++++++++++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
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..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 {
|
||||
GameProfile gameprofile = entityplayer.getProfile();
|
||||
int i = this.server.b(gameprofile);
|
||||
|
||||
+ // Purpur start
|
||||
+ if (net.pl3x.purpur.PurpurConfig.updatePermsAndCommandsAsync) {
|
||||
+ java.util.concurrent.ForkJoinPool.commonPool().execute(new java.util.concurrent.RecursiveAction() {
|
||||
+ protected void compute() {
|
||||
+ recalculatePermsAndCommands(entityplayer, i);
|
||||
+ }
|
||||
+ });
|
||||
+ } else
|
||||
+ // Purpur end
|
||||
this.a(entityplayer, i);
|
||||
}
|
||||
|
||||
@@ -893,6 +902,7 @@ public abstract class PlayerList {
|
||||
|
||||
}
|
||||
|
||||
+ private void recalculatePermsAndCommands(EntityPlayer entityplayer, int i) { a(entityplayer, i); } // Purpur - OBFHELPER
|
||||
private void a(EntityPlayer entityplayer, int i) {
|
||||
if (entityplayer.playerConnection != null) {
|
||||
byte b0;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index b42b3dfa72..0c4c4ee9d2 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -207,4 +207,9 @@ public class PurpurConfig {
|
||||
enchantment.setMaxLevel(maxLevel);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public static boolean updatePermsAndCommandsAsync = false;
|
||||
+ private static void updatePermsAndCommandsAsync() {
|
||||
+ updatePermsAndCommandsAsync = getBoolean("settings.update-permissions-and-commands-async", updatePermsAndCommandsAsync);
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
||||
Reference in New Issue
Block a user