Files
Purpur/patches/api/0030-Added-the-ability-to-add-combustible-items.patch
2024-12-20 15:44:16 -08:00

61 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DoctaEnkoda <bierquejason@gmail.com>
Date: Mon, 9 Aug 2021 13:22:03 +0200
Subject: [PATCH] Added the ability to add combustible items
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index cd6c712a2ad92f73c7ce8f4ada8b810fcba00ba3..79528ad4408eac53754ccc810445970e263a1a32 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2987,5 +2987,24 @@ public final class Bukkit {
public static boolean isLagging() {
return server.isLagging();
}
+
+ /**
+ * 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
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 788702d1c5be00a78a0438e267fe5fca9985e4ce..c1523229138d5d07569c8e564cf27b8276cca153 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2634,5 +2634,20 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return True if lagging
*/
boolean isLagging();
+
+ /**
+ * 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
}