mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-20 10:18:16 +02:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
This commit is contained in:
49
patches/api/0012-Implement-lagging-threshold.patch
Normal file
49
patches/api/0012-Implement-lagging-threshold.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From 25c7441fd2fe5c753d82cb728ff762125fff9983 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 10:07:24 -0500
|
||||
Subject: [PATCH] Implement lagging threshold
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/Bukkit.java | 9 +++++++++
|
||||
src/main/java/org/bukkit/Server.java | 7 +++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 33ccf2979..ee8fe48aa 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1724,5 +1724,14 @@ public final class Bukkit {
|
||||
public static String getServerName() {
|
||||
return server.getServerName();
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Check if server is lagging according to laggy threshold setting
|
||||
+ *
|
||||
+ * @return True if lagging
|
||||
+ */
|
||||
+ public static boolean isLagging() {
|
||||
+ return server.isLagging();
|
||||
+ }
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 8d3501a67..c35405e09 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1513,5 +1513,12 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
@NotNull
|
||||
String getServerName();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if server is lagging according to laggy threshold setting
|
||||
+ *
|
||||
+ * @return True if lagging
|
||||
+ */
|
||||
+ boolean isLagging();
|
||||
// Purpur end
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
||||
Reference in New Issue
Block a user