Added the ability to add combustible items

This commit is contained in:
DoctaEnkoda
2025-01-12 12:40:23 -08:00
committed by granny
parent aedc9f8985
commit 2ecfc259c4
7 changed files with 81 additions and 127 deletions

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2968,4 +_,26 @@
@@ -2968,4 +_,47 @@
public static Server.Spigot spigot() {
return server.spigot();
}
@@ -26,4 +26,25 @@
+ return server.isLagging();
+ }
+ // Purpur end - Lagging threshold
+
+ // Purpur start - Added the ability to add combustible items
+ /**
+ * Add an Item as fuel for furnaces
+ *
+ * @param material The material that will be the fuel
+ * @param burnTime The time (in ticks) this item will burn for
+ */
+ public static void addFuel(@NotNull Material material, int burnTime) {
+ server.addFuel(material, burnTime);
+ }
+
+ /**
+ * Remove an item as fuel for furnaces
+ *
+ * @param material The material that will no longer be a fuel
+ */
+ public static void removeFuel(@NotNull Material material) {
+ server.removeFuel(material);
+ }
+ // Purpur end - Added the ability to add combustible items
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2607,4 +_,22 @@
@@ -2607,4 +_,39 @@
*/
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
// Paper end - API to check if the server is sleeping
@@ -22,4 +22,21 @@
+ */
+ boolean isLagging();
+ // Purpur end - Lagging threshold
+
+ // Purpur start - Added the ability to add combustible items
+ /**
+ * Add an Item as fuel for furnaces
+ *
+ * @param material The material that will be the fuel
+ * @param burnTime The time (in ticks) this item will burn for
+ */
+ public void addFuel(@NotNull Material material, int burnTime);
+
+ /**
+ * Remove an item as fuel for furnaces
+ *
+ * @param material The material that will no longer be a fuel
+ */
+ public void removeFuel(@NotNull Material material);
+ // Purpur end - Added the ability to add combustible items
}