Plugin errors.

Discussion in 'Plugin Development' started by Aephout14, Oct 1, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Aephout14

    Title pretty much says it all, I am trying to create, Load a config so you can enable and disable the recipes
    http://pastebin.com/8F57hiAh

    Code:java
    1. public class Main extends JavaPlugin { <- That bracket is errored (Red)


    Code:java
    1. }
    2. if (getConfig().getBoolean("villagespawner")) {
    3. ShapedRecipe villagespawner = new ShapedRecipe(new ItemStack(Material.MOB_SPAWNER,3, (short) 120));
    4. villagespawner.shape(new String[]{"OOO","EEE","OOO"}).setIngredient('O', Material.OBSIDIAN).setIngredient('E', Material.EMERALD);
    5. Bukkit.getServer().addRecipe(villagespawner);
    6. }{
    7. } <- That one is also red
     
  2. Offline

    HeadGam3z

    Check your opening and closing brackets. You made an error with the brackets and most likely copied and pasted the error in multiple sections of your code, thus making it break.
     
  3. Offline

    Jaaakee224

  4. Offline

    Aephout14

    I think so yes.
     
  5. Offline

    fireblast709

    The_FrosTy_Clan There is a lot of nesting going on there, which shouldn't even be there. That aside, you have a lot of misplaced/missing braces.
     
  6. Offline

    Aephout14

    fireblast709 Mind rewriting the brackets for me, I have never been good with it
     
  7. Offline

    fireblast709

    I rather have you do it yourself, since you will have to write a lot of brackets when writing Java. It will be good practice :p.
     
  8. Offline

    Aephout14

    fireblast709 Ok then, Mind showing me what lines to do so, I ain't good doing it
     
Thread Status:
Not open for further replies.

Share This Page