Separate class for Shaped/Shapeless/Furnace Recipes?

Discussion in 'Plugin Development' started by Incomprehendable, Jul 28, 2013.

Thread Status:
Not open for further replies.
  1. I've set up a separate class in my BasicCraft plugin to hold all the information for crafting recipes. How would I be able to get the information from that class into my onEnable() method in my main class?

    The method in the class that stores the recipe information is public. I've tried creating a constructor but it doesn't seem to be working.

    Code:java
    1. public void onEnable() {
    2. final Server server = this.getServer();
    3. Bukkit.getPluginManager().registerEvents(this, this);
    4. getLogger().info("BasicCraft enabled! Yay!");
    5. Recipes r = new Recipes();
    6.  
    7.  
    8. server.addRecipe(r.rec().l);

    The class with the recipe data is called Recipes and the method that stores the data is called rec.
    That first addRecipe throws an error at the recipe variable, which is just l.
     
  2. Actually showing the recipes class & error might help
     
Thread Status:
Not open for further replies.

Share This Page