Class Brewery

java.lang.Object
me.mehboss.brewing.Brewery
All Implemented Interfaces:
org.bukkit.event.Listener

public class Brewery extends Object implements org.bukkit.event.Listener
Handles the registration and execution of custom brewing recipes.

This class acts as the core manager for custom brewing logic by:

  • Maintaining a static singleton reference for recipe access
  • Listening for brewing stand inventory interactions
  • Triggering custom brewing behavior when recipe inputs match
Custom brewing recipes are retrieved through BrewingRecipe.getRecipe(BrewerInventory) and executed using BrewingRecipe.startBrewing(BrewerInventory, BrewingRecipeData).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Brewery(org.bukkit.plugin.java.JavaPlugin plugin)
    Creates a new Brewery manager and registers it as an event listener.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Brewery
     
    org.bukkit.plugin.java.JavaPlugin
     
    void
    onBrewClick(org.bukkit.event.inventory.InventoryClickEvent event)
    Intercepts brewing stand clicks and evaluates whether custom brewing should begin.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Brewery

      public Brewery(org.bukkit.plugin.java.JavaPlugin plugin)
      Creates a new Brewery manager and registers it as an event listener.
      Parameters:
      plugin - The plugin instance that owns this brewing system.
  • Method Details

    • getInstance

      public static Brewery getInstance()
    • getPlugin

      public org.bukkit.plugin.java.JavaPlugin getPlugin()
    • onBrewClick

      public void onBrewClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Intercepts brewing stand clicks and evaluates whether custom brewing should begin.

      This event handler:

      Parameters:
      event - The InventoryClickEvent triggered when a player interacts with an inventory.