Class SmithingTableGui

All Implemented Interfaces:
InventoryBased, InventoryHolder

@Deprecated public class SmithingTableGui extends NamedGui implements InventoryBased
Deprecated.
Represents a gui in the form of a smithing table. This is the ;egacy variant with two input slots, available prior to Minecraft 1.20.
Since:
0.8.0
  • Constructor Details

    • SmithingTableGui

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

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

      public SmithingTableGui(@NotNull @NotNull String title, @NotNull @NotNull Plugin plugin)
      Deprecated.
      Constructs a new smithing table gui for the given plugin.
      Parameters:
      title - the title/name of this gui.
      plugin - the owning plugin of this gui
      Since:
      0.10.8
      See Also:
    • SmithingTableGui

      public SmithingTableGui(@NotNull @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title, @NotNull @NotNull Plugin plugin)
      Deprecated.
      Constructs a new smithing table gui for the given plugin.
      Parameters:
      title - the title/name of this gui.
      plugin - the owning plugin of this gui
      Since:
      0.10.8
      See Also:
  • Method Details

    • show

      public void show(@NotNull @NotNull HumanEntity humanEntity)
      Deprecated.
      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 SmithingTableGui copy()
      Deprecated.
      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 original owning plugin of the gui is preserved, but the plugin will not be deeply copied. 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 InventoryClickEvent event)
      Deprecated.
      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
    • getInventory

      @NotNull public @NotNull Inventory getInventory()
      Deprecated.
      Specified by:
      getInventory in interface InventoryHolder
    • isPlayerInventoryUsed

      @Contract(pure=true) public boolean isPlayerInventoryUsed()
      Deprecated.
      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
    • createInventory

      @NotNull @Contract(pure=true) public @NotNull Inventory createInventory()
      Deprecated.
      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
    • handleClickEvent

      public void handleClickEvent(@NotNull @NotNull InventoryClickEvent event)
      Deprecated.
      Handles an incoming inventory click event
      Parameters:
      event - the event to handle
      Since:
      0.8.0
    • getViewerCount

      @Contract(pure=true) public int getViewerCount()
      Deprecated.
      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<HumanEntity> getViewers()
      Deprecated.
      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:
    • getFirstItemComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getFirstItemComponent()
      Deprecated.
      Gets the inventory component representing the first item
      Returns:
      the first item component
      Since:
      0.8.0
    • getSecondItemComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getSecondItemComponent()
      Deprecated.
      Gets the inventory component representing the second item
      Returns:
      the second item component
      Since:
      0.8.0
    • getResultComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getResultComponent()
      Deprecated.
      Gets the inventory component representing the result
      Returns:
      the result component
      Since:
      0.8.0
    • getPlayerInventoryComponent

      @NotNull @Contract(pure=true) public @NotNull InventoryComponent getPlayerInventoryComponent()
      Deprecated.
      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 SmithingTableGui load(@NotNull @NotNull Object instance, @NotNull @NotNull InputStream inputStream, @NotNull @NotNull Plugin plugin)
      Deprecated.
      Loads a smithing table gui from an XML file.
      Parameters:
      instance - the instance on which to reference fields and methods
      inputStream - the input stream containing the XML data
      plugin - the plugin that will be the owner of the created gui
      Returns:
      the loaded smithing table gui
      Since:
      0.10.8
      See Also:
    • load

      @NotNull public static @NotNull SmithingTableGui load(@NotNull @NotNull Object instance, @NotNull @NotNull Element element, @NotNull @NotNull Plugin plugin)
      Deprecated.
      Loads a smithing table 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
      plugin - the plugin that will be the owner of the created gui
      Returns:
      the loaded smithing table gui
      Since:
      0.10.8
    • load

      @Nullable @Contract(pure=true) public static @Nullable SmithingTableGui load(@NotNull @NotNull Object instance, @NotNull @NotNull InputStream inputStream)
      Deprecated.
      Loads a smithing table 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 smithing table gui
      Since:
      0.8.0
    • load

      @NotNull public static @NotNull SmithingTableGui load(@NotNull @NotNull Object instance, @NotNull @NotNull Element element)
      Deprecated.
      Loads a smithing table 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 smithing table gui
      Since:
      0.8.0