All Implemented Interfaces:
InventoryBased, org.bukkit.inventory.InventoryHolder

public class BrewingStandGui extends NamedGui implements InventoryBased
Represents a gui in the form of a brewing stand
Since:
0.8.0
  • Constructor Details

    • BrewingStandGui

      public BrewingStandGui(@NotNull @NotNull String title)
      Constructs a new GUI
      Parameters:
      title - the title/name of this gui.
      Since:
      0.8.0
    • BrewingStandGui

      public BrewingStandGui(@NotNull @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title)
      Constructs a new GUI
      Parameters:
      title - the title/name of this gui.
      Since:
      0.10.0
  • Method Details

    • show

      public void show(@NotNull @NotNull org.bukkit.entity.HumanEntity humanEntity)
      Description copied from class: Gui
      Shows a gui to a player
      Specified by:
      show in class Gui
      Parameters:
      humanEntity - the human entity to show the gui to
    • copy

      @NotNull @Contract(pure=true) public @NotNull BrewingStandGui copy()
      Description copied from class: Gui
      Makes a copy of this gui and returns it. This makes a deep copy of the gui. This entails that the underlying panes will be copied as per their Pane.copy() and miscellaneous data will be copied. The copy of this gui, will however have no viewers even if this gui currently has viewers. With this, cache data for viewers will also be non-existent for the copied gui. The returned gui will never be reference equal to the current gui.
      Specified by:
      copy in class Gui
      Returns:
      a copy of the gui
    • click

      public void click(@NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event)
      Description copied from class: Gui
      This should delegate the provided inventory click event to the right pane, which can then handle this click event further. This should not call any internal click handlers, since those will already have been activated.
      Specified by:
      click in class Gui
      Parameters:
      event - the event to delegate
    • isPlayerInventoryUsed

      @Contract(pure=true) public boolean isPlayerInventoryUsed()
      Description copied from class: Gui
      Gets whether the player inventory is currently in use. This means whether the player inventory currently has an item in it.
      Specified by:
      isPlayerInventoryUsed in class Gui
      Returns:
      true if the player inventory is occupied, false otherwise
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
    • createInventory

      @NotNull @Contract(pure=true) public @NotNull org.bukkit.inventory.Inventory createInventory()
      Description copied from interface: InventoryBased
      Creates a new inventory of the type of the implementing class.
      Specified by:
      createInventory in interface InventoryBased
      Returns:
      the new inventory
    • getViewerCount

      @Contract(pure=true) public int getViewerCount()
      Description copied from class: Gui
      Gets the count of HumanEntity instances that are currently viewing this GUI.
      Specified by:
      getViewerCount in class Gui
      Returns:
      the count of viewers
    • getViewers

      @NotNull @Contract(pure=true) public @NotNull List<org.bukkit.entity.HumanEntity> getViewers()
      Description copied from class: Gui
      Gets a mutable snapshot of the current HumanEntity viewers of this GUI. This is a snapshot (copy) and not a view, therefore modifications aren't visible.
      Specified by:
      getViewers in class Gui
      Returns:
      a snapshot of the current viewers
      See Also:
      Gui.getViewerCount()
    • getFirstBottleComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getFirstBottleComponent()
      Gets the inventory component representing the first bottle
      Returns:
      the first bottle component
      Since:
      0.8.0
    • getSecondBottleComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getSecondBottleComponent()
      Gets the inventory component representing the second bottle
      Returns:
      the second bottle component
      Since:
      0.8.0
    • getThirdBottleComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getThirdBottleComponent()
      Gets the inventory component representing the third bottle
      Returns:
      the third bottle component
      Since:
      0.8.0
    • getPotionIngredientComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getPotionIngredientComponent()
      Gets the inventory component representing the potion ingredient
      Returns:
      the potion ingredient component
      Since:
      0.8.0
    • getBlazePowderComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getBlazePowderComponent()
      Gets the inventory component representing the blaze powder
      Returns:
      the blaze powder component
      Since:
      0.8.0
    • getPlayerInventoryComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getPlayerInventoryComponent()
      Gets the inventory component representing the player inventory
      Returns:
      the player inventory component
      Since:
      0.8.0
    • load

      @Nullable @Contract(pure=true) public static @Nullable BrewingStandGui load(@NotNull @NotNull Object instance, @NotNull @NotNull InputStream inputStream)
      Loads a brewing stand gui from an XML file.
      Parameters:
      instance - the instance on which to reference fields and methods
      inputStream - the input stream containing the XML data
      Returns:
      the loaded brewing stand gui
      Since:
      0.8.0
    • load

      @NotNull public static @NotNull BrewingStandGui load(@NotNull @NotNull Object instance, @NotNull @NotNull Element element)
      Loads a brewing stand gui from the specified element, applying code references to the provided instance.
      Parameters:
      instance - the instance on which to reference fields and methods
      element - the element to load the gui from
      Returns:
      the loaded brewing stand gui
      Since:
      0.8.0