Added the ability to add combustible items (#570)

This commit is contained in:
Bierque Jason
2021-08-23 22:11:04 +02:00
committed by GitHub
parent b03eac1f35
commit 879ead8c91
2 changed files with 153 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
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 e4ec2a0c15a6ada5bef9671e427cd56413f18d80..390a0d09b78e46cfebe78bfa3d1dd73aedca8256 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2082,5 +2082,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 80c70522eecb08c0dbfadcdeb21c9cfac42d7902..faf8cff5c1b586d9404bdecb522d45a09fc7fe92 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1827,5 +1827,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
}