mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
#467: Add method to remove a recipe by its key
By: ShaneBee <shanebolenback@me.com>
This commit is contained in:
@@ -674,6 +674,20 @@ public final class Bukkit {
|
|||||||
server.resetRecipes();
|
server.resetRecipes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a recipe from the server.
|
||||||
|
*
|
||||||
|
* <b>Note that removing a recipe may cause permanent loss of data
|
||||||
|
* associated with that recipe (eg whether it has been discovered by
|
||||||
|
* players).</b>
|
||||||
|
*
|
||||||
|
* @param key NamespacedKey of recipe to remove.
|
||||||
|
* @return True if recipe was removed
|
||||||
|
*/
|
||||||
|
public static boolean removeRecipe(@NotNull NamespacedKey key) {
|
||||||
|
return server.removeRecipe(key);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of command aliases defined in the server properties.
|
* Gets a list of command aliases defined in the server properties.
|
||||||
*
|
*
|
||||||
|
@@ -559,6 +559,18 @@ public interface Server extends PluginMessageRecipient {
|
|||||||
*/
|
*/
|
||||||
public void resetRecipes();
|
public void resetRecipes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a recipe from the server.
|
||||||
|
*
|
||||||
|
* <b>Note that removing a recipe may cause permanent loss of data
|
||||||
|
* associated with that recipe (eg whether it has been discovered by
|
||||||
|
* players).</b>
|
||||||
|
*
|
||||||
|
* @param key NamespacedKey of recipe to remove.
|
||||||
|
* @return True if recipe was removed
|
||||||
|
*/
|
||||||
|
public boolean removeRecipe(@NotNull NamespacedKey key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of command aliases defined in the server properties.
|
* Gets a list of command aliases defined in the server properties.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user