Add/change recipes by plugin

This commit is contained in:
Sn0wStorm
2019-11-09 17:02:48 +01:00
parent 81ea014e45
commit 318963b379
12 changed files with 697 additions and 41 deletions
@@ -0,0 +1,42 @@
package com.dre.brewery.api.events;
import com.dre.brewery.api.BreweryApi;
import com.dre.brewery.recipe.BCauldronRecipe;
import com.dre.brewery.recipe.BRecipe;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class ConfigLoadEvent extends Event {
private static final HandlerList handlers = new HandlerList();
/**
* One of the things one might need to do after reloading
* Removes a Recipe, can also remove config recipes
*
* @param name Name of the Recipe to remove
* @return The Recipe that was removed, null if none was removed
*/
public BRecipe removeRecipe(String name) {
return BreweryApi.removeRecipe(name);
}
/**
* One of the things one might need to do after reloading
* Removes a Cauldron Recipe, can also remove config recipes
*
* @param name Name of the Cauldron Recipe to remove
* @return The Cauldron Recipe that was removed, null if none was removed
*/
public BCauldronRecipe removeCauldronRecipe(String name) {
return BreweryApi.removeCauldronRecipe(name);
}
@NotNull
@Override
public HandlerList getHandlers() {
return handlers;
}
}