Custom Crafting help

Discussion in 'Spigot Plugin Development' started by AppleMonJeans, Jun 12, 2017.

  1. Are you getting any errors?

    EDIT: In the main class, you are calling "new GenBuckets()" twice.

    If you are going to be using the GenBuckets class more than once, just instantiate the class above your onEnable method and use that field throughout the class, instead of creating a new instance of it each time.

    Code (Text):
    private GenBuckets genBuckets = new GenBuckets();

    public void onEnable(){



    private void registerEvents(){

    PluginManager pm = Bukkit.getPluginManager();
    pm.registerEvents(genBuckets, this);

    #2 Waldxn, Jun 12, 2017
    Last edited: Jun 12, 2017
  2. No but the shapeless recipe is not working
  3. Check my edit. Also, you created the registerEvents method in your main class, but never use it. You instead register the events in the on enable with:
    Code (Text):
    Bukkit.getPluginManager().registerEvents(new GenBuckets(), this);
    All you have to insert in your onEnable is:
    Code (Text):
    Just make sure to register your events in the appropriate method created.
  4. Ok thanks I'll give it a try in a bit!
  5. It should work fine, but let me know if you have any more issues.