Class DataHandler

java.lang.Object
me.wolfyscript.customcrafting.handlers.DataHandler

public class DataHandler extends Object
  • Field Details

    • DATA_FOLDER

      public static final File DATA_FOLDER
  • Constructor Details

  • Method Details

    • initCategories

      public void initCategories()
    • load

      public void load(boolean update)
    • loadRecipesAndItems

      public void loadRecipesAndItems()
    • saveData

      public void saveData()
    • onSave

      public void onSave()
    • getDisabledRecipes

      public Set<me.wolfyscript.utilities.util.NamespacedKey> getDisabledRecipes()
      Returns:
      A list of recipes that are disabled.
    • isRecipeDisabled

      @Deprecated public boolean isRecipeDisabled(ICustomRecipe<?,​?> recipe)
      Deprecated.
      Parameters:
      recipe - The recipe to check.
      Returns:
      if the recipe is disabled.
    • toggleRecipe

      public void toggleRecipe(ICustomRecipe<?,​?> recipe)
    • disableRecipe

      public void disableRecipe(ICustomRecipe<?,​?> recipe)
    • enableRecipe

      public void enableRecipe(ICustomRecipe<?,​?> recipe)
    • isBukkitRecipeDisabled

      public boolean isBukkitRecipeDisabled(org.bukkit.NamespacedKey namespacedKey)
    • toggleBukkitRecipe

      public void toggleBukkitRecipe(org.bukkit.NamespacedKey namespacedKey)
    • disableBukkitRecipe

      public void disableBukkitRecipe(org.bukkit.NamespacedKey namespacedKey)
    • enableBukkitRecipe

      public void enableBukkitRecipe(org.bukkit.NamespacedKey namespacedKey)
    • getMinecraftRecipes

      public List<org.bukkit.inventory.Recipe> getMinecraftRecipes()
    • getBukkitNamespacedKeys

      public List<String> getBukkitNamespacedKeys()
    • getIngredients

      public List<List<org.bukkit.inventory.ItemStack>> getIngredients(org.bukkit.inventory.ItemStack[] ingredients)
    • loadRecipeIntoCache

      public boolean loadRecipeIntoCache(ICustomRecipe<?,​?> recipe, me.wolfyscript.utilities.api.inventory.gui.GuiHandler<CCCache> guiHandler)
      Loads a recipe copy into the CCCache of the GuiHandler.
      Parameters:
      recipe - The recipe to load.
      guiHandler - The GuiHandler to load into.
      Returns:
      If the recipe was successfully loaded into cache.
    • getCategories

      public Categories getCategories()