2020-08-03 18:48:42 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-10-27 20:15:13 +01:00
|
|
|
From: YatopiaMC <yatopiamc@gmail.com>
|
2020-08-03 18:48:42 +02:00
|
|
|
Date: Sat, 1 Aug 2020 15:51:06 -0500
|
|
|
|
Subject: [PATCH] Yatopia API Bundle
|
|
|
|
|
2020-08-05 15:21:25 +02:00
|
|
|
Lagging threshold + Purpur & Rainforest & Origami config
|
2020-08-03 18:48:42 +02:00
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
2020-12-13 16:18:57 +01:00
|
|
|
index fecd7b14d317f55eb1ce7b5c6af9913917971427..6df897ed32a94df4a06e1d5ac3d749e6a360ab2f 100644
|
2020-08-03 18:48:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2020-12-13 16:18:57 +01:00
|
|
|
@@ -1817,4 +1817,15 @@ public final class Bukkit {
|
2020-08-03 18:48:42 +02:00
|
|
|
public static Server.Spigot spigot() {
|
|
|
|
return server.spigot();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Purpur start
|
|
|
|
+ /**
|
2020-08-11 17:38:17 +02:00
|
|
|
+ * Check if the server is lagging, according to the laggy threshold setting.
|
2020-08-03 18:48:42 +02:00
|
|
|
+ *
|
2020-08-11 17:38:17 +02:00
|
|
|
+ * @return true if lagging
|
2020-08-03 18:48:42 +02:00
|
|
|
+ */
|
|
|
|
+ public static boolean isLagging() {
|
|
|
|
+ return server.isLagging();
|
|
|
|
+ }
|
|
|
|
+ // Purpur end
|
|
|
|
}
|
2021-01-05 18:21:38 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
|
|
|
|
index 06bdfddb7b1acb7bb7b347ad1aa13bff0c823ab1..bd2723618272068bee0fb6be8d702c34cb44762b 100644
|
|
|
|
--- a/src/main/java/org/bukkit/ChatColor.java
|
|
|
|
+++ b/src/main/java/org/bukkit/ChatColor.java
|
|
|
|
@@ -312,6 +312,7 @@ public enum ChatColor {
|
|
|
|
* @return Associative {@link org.bukkit.ChatColor} with the given id,
|
|
|
|
* or null if it doesn't exist
|
|
|
|
*/
|
|
|
|
+ @Nullable // Yatopia
|
|
|
|
public static ChatColor getById(int id) {
|
|
|
|
return BY_ID.get(id);
|
|
|
|
}
|
2020-08-03 18:48:42 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
2020-12-13 16:18:57 +01:00
|
|
|
index b45ad8df8b7a44c9e6d12326e5ea85e8d166a16c..40d342ef1a618b7d85731b238b0344402e551251 100644
|
2020-08-03 18:48:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2020-12-13 16:18:57 +01:00
|
|
|
@@ -1490,6 +1490,58 @@ public interface Server extends PluginMessageRecipient {
|
2020-08-03 18:48:42 +02:00
|
|
|
}
|
2020-08-11 17:38:17 +02:00
|
|
|
// Tuinity end - add config to timings report
|
2020-08-03 18:48:42 +02:00
|
|
|
|
2020-08-11 17:38:17 +02:00
|
|
|
+ // 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
|
|
|
|
+
|
2020-08-05 15:21:25 +02:00
|
|
|
+ // Rainforest start
|
2020-09-13 09:00:43 +02:00
|
|
|
+ /**
|
|
|
|
+ * @deprecated yatopia does not import akarin config anymore
|
|
|
|
+ */
|
|
|
|
+ @Deprecated
|
2020-08-03 18:48:42 +02:00
|
|
|
+ @NotNull
|
2020-08-05 15:21:25 +02:00
|
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getRainforestConfig()
|
2020-08-03 18:48:42 +02:00
|
|
|
+ {
|
2020-09-13 09:00:43 +02:00
|
|
|
+ return new org.bukkit.configuration.file.YamlConfiguration();
|
2020-08-03 18:48:42 +02:00
|
|
|
+ }
|
2020-08-05 15:21:25 +02:00
|
|
|
+ // Rainforest end
|
|
|
|
+
|
2020-08-03 18:48:42 +02:00
|
|
|
+ // Purpur start
|
|
|
|
+ @NotNull
|
2020-08-11 17:38:17 +02:00
|
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig()
|
|
|
|
+ {
|
2020-08-03 18:48:42 +02:00
|
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @NotNull
|
2020-08-11 17:38:17 +02:00
|
|
|
+ public java.util.Properties getServerProperties()
|
|
|
|
+ {
|
2020-08-03 18:48:42 +02:00
|
|
|
+ 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
|
2020-08-13 17:53:32 +02:00
|
|
|
+ // Yatopia start - add config to timings report
|
|
|
|
+ @NotNull
|
|
|
|
+ public org.bukkit.configuration.file.YamlConfiguration getYatopiaConfig()
|
|
|
|
+ {
|
|
|
|
+ throw new UnsupportedOperationException("Not supported yet.");
|
|
|
|
+ }
|
|
|
|
+ // Yatopia end
|
2020-08-03 18:48:42 +02:00
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Sends the component to the player
|
|
|
|
*
|
2020-12-13 16:18:57 +01:00
|
|
|
@@ -1590,4 +1642,13 @@ public interface Server extends PluginMessageRecipient {
|
2020-08-03 18:48:42 +02:00
|
|
|
@NotNull
|
|
|
|
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
|
|
|
// Paper end
|
|
|
|
+
|
|
|
|
+ // Purpur start
|
|
|
|
+ /**
|
2020-08-11 17:38:17 +02:00
|
|
|
+ * Check if the server is lagging, according to the laggy threshold setting.
|
|
|
|
+ *
|
|
|
|
+ * @return true if lagging
|
|
|
|
+ */
|
2020-08-03 18:48:42 +02:00
|
|
|
+ boolean isLagging();
|
|
|
|
+ // Purpur end
|
|
|
|
}
|