Class GuiItemManager

java.lang.Object
io.github.toberocat.guiengine.item.GuiItemManager

public class GuiItemManager extends Object
GuiItemManager is responsible for managing and providing access to known GUI items.

Created: 21.07.2023 Author: Tobias Madlberger (Tobias)

  • Constructor Summary

    Constructors
    Constructor
    Description
    GuiItemManager(@NotNull org.bukkit.configuration.file.FileConfiguration config)
    Creates a new GuiItemManager and initializes it with GUI items loaded from the given FileConfiguration.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.bukkit.inventory.ItemStack
    getItem(@NotNull String name)
    Retrieves the ItemStack representation of the GUI item with the given name.
    @NotNull Map<String,org.bukkit.inventory.ItemStack>
    Returns a map containing all the known GUI items, where keys are the names of the items, and values are their corresponding ItemStack representations.

    Methods inherited from class java.lang.Object

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

    • GuiItemManager

      public GuiItemManager(@NotNull @NotNull org.bukkit.configuration.file.FileConfiguration config)
      Creates a new GuiItemManager and initializes it with GUI items loaded from the given FileConfiguration.
      Parameters:
      config - The FileConfiguration containing the configuration data for GUI items.
  • Method Details

    • getItem

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getItem(@NotNull @NotNull String name)
      Retrieves the ItemStack representation of the GUI item with the given name.
      Parameters:
      name - The name of the GUI item to retrieve.
      Returns:
      The ItemStack representation of the GUI item if found, or null if not present in the manager.
    • getKnownItems

      @NotNull public @NotNull Map<String,org.bukkit.inventory.ItemStack> getKnownItems()
      Returns a map containing all the known GUI items, where keys are the names of the items, and values are their corresponding ItemStack representations.
      Returns:
      A map of known GUI items with names as keys and ItemStacks as values.