Class GuiItemManager
java.lang.Object
io.github.toberocat.guiengine.item.GuiItemManager
GuiItemManager is responsible for managing and providing access to known GUI items.
Created: 21.07.2023 Author: Tobias Madlberger (Tobias)
-
Constructor Summary
ConstructorsConstructorDescriptionGuiItemManager
(@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 TypeMethodDescription@Nullable org.bukkit.inventory.ItemStack
Retrieves the ItemStack representation of the GUI item with the given name.Returns a map containing all the known GUI items, where keys are the names of the items, and values are their corresponding ItemStack representations.
-
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
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
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.
-