Solved Can someone tell me why this isn't working?

Discussion in 'Plugin Development' started by lon_chaney, Jul 26, 2014.

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

    lon_chaney

    Code:java
    1. package me.lonchaney.CustomRecipes;
    2.  
    3. import org.bukkit.Material;
    4. import org.bukkit.event.Listener;
    5. import org.bukkit.inventory.ItemStack;
    6. import org.bukkit.inventory.ShapedRecipe;
    7. import org.bukkit.plugin.java.JavaPlugin;
    8.  
    9. class Main extends JavaPlugin implements Listener{
    10.  
    11. @Override
    12. public void onDisable() {
    13. getServer().clearRecipes();
    14. }
    15.  
    16. @Override
    17. public void onEnable() {
    18. getServer().getPluginManager().registerEvents(this, this);
    19.  
    20. ShapedRecipe nametag = new ShapedRecipe(new ItemStack(Material.NAME_TAG, 1));
    21. nametag.shape("ISP", "SPS", "PSF");
    22. nametag.setIngredient('I', Material.INK_SACK);
    23. nametag.setIngredient('S', Material.STRING);
    24. nametag.setIngredient('P', Material.PAPER);
    25. nametag.setIngredient('F', Material.FEATHER);
    26.  
    27. getServer().addRecipe(nametag);
    28.  
    29. }
    30.  
    31. }
     
  2. Offline

    Niknea

    lon_chaney We need more information than what's provided. For example, what's not working?
     
  3. Offline

    lon_chaney

    Last edited by a moderator: Jun 9, 2016
  4. Offline

    mythbusterma

    Only bump once every twenty four hours.

    Are you sure your plugin is loading?
     
  5. Offline

    lon_chaney

  6. Offline

    mythbusterma

  7. Offline

    Mike0so

    Theres something wrong with you're Plugin.yml i guess.
     
  8. Offline

    minecraft124_

    You need to make your main class public.
     
    xTigerRebornx likes this.
  9. This.
     
  10. Offline

    lon_chaney

    Oops, forgot to mark it as solved, I figured it out earlier, I accidentally deleted the word "public"....
     
Thread Status:
Not open for further replies.

Share This Page