Yatopia/patches/api/0001-Yatopia-API-Bundle.patch
Ivan Pekov 755f429c32
Patch port changes
Dropped some patches from purpur, added 2 patches from purpur.
Readded hopper optimizations from origami.
2020-10-04 18:43:50 +03:00

105 lines
3.4 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 bfe842364ee0a4bf39dacdbb6972477d57a4ef8a..8d172d58b7c935f608ac49d3376d5b90bdf0abdd 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1787,4 +1787,15 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
+
+ // Purpur start
+ /**
+ * Check if the server is lagging, according to the 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 740a86a808bf0470a755b5f728640557733bfbca..d92d19a689c5dd928095c082a7c96680e97c6e6a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1464,6 +1464,58 @@ public interface Server extends PluginMessageRecipient {
}
// Tuinity end - add config to timings report
+ // Akarin start
+ /**
+ * @deprecated yatopia does not import akarin config anymore
+ */
+ @Deprecated
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getAkarinConfig()
+ {
+ return new org.bukkit.configuration.file.YamlConfiguration();
+ }
+ // Akarin end
+
+ // Rainforest start
+ /**
+ * @deprecated yatopia does not import akarin config anymore
+ */
+ @Deprecated
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getRainforestConfig()
+ {
+ return new org.bukkit.configuration.file.YamlConfiguration();
+ }
+ // 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
+ // Yatopia start - add config to timings report
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getYatopiaConfig()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Yatopia end
+
/**
* Sends the component to the player
*
@@ -1564,4 +1616,13 @@ public interface Server extends PluginMessageRecipient {
@NotNull
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
// Paper end
+
+ // Purpur start
+ /**
+ * Check if the server is lagging, according to the laggy threshold setting.
+ *
+ * @return true if lagging
+ */
+ boolean isLagging();
+ // Purpur end
}