Yatopia/patches/api/0001-Yatopia-API-Bundle.patch
2020-08-05 08:21:25 -05:00

80 lines
2.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bud Gidiere <sgidiere@gmail.com>
Date: Sat, 1 Aug 2020 15:51:06 -0500
Subject: [PATCH] Yatopia API Bundle
Lagging threshold + Purpur & Rainforest & Origami config
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..0770736b4b52f325027671b43f74ad038c97ce7f 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1776,4 +1776,15 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
+
+ // Purpur start
+ /**
+ * 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 1f916988bd54e8386011b0d7e82fc9219939a881..154c24a5a32450636b1c554df1bb5262fa05e9c8 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1463,6 +1463,33 @@ public interface Server extends PluginMessageRecipient {
}
// Akarin end - Server config
+ // Rainforest start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getRainforestConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Rainforest end
+
+ // Purpur start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @NotNull
+ public java.util.Properties getServerProperties() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Purpur end
+ // Origami start - add config to timings report
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getOrigamiConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Origami end
+
/**
* Sends the component to the player
*
@@ -1563,4 +1590,13 @@ public interface Server extends PluginMessageRecipient {
@NotNull
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
// Paper end
+
+ // Purpur start
+ /**
+ * Check if server is lagging according to laggy threshold setting
+ *
+ * @return True if lagging
+ */
+ boolean isLagging();
+ // Purpur end
}