Class CustomItemManager

java.lang.Object
com.github.pinont.singularitylib.api.manager.CustomItemManager

public class CustomItemManager extends Object
Manages custom items and provides a give command for them. This class handles registration of custom items and provides functionality to give items to players through commands.
  • Field Details

    • customItems

      public List<CustomItem> customItems
      List of registered custom items managed by this manager. This list contains all custom items that have been registered and are available for use in commands and other operations.
  • Constructor Details

    • CustomItemManager

      public CustomItemManager()
      Default constructor for CustomItemManager. Initializes the manager with empty collections ready for item registration.
  • Method Details

    • getCustomItems

      public List<CustomItem> getCustomItems()
      Gets the list of registered custom items.
      Returns:
      an unmodifiable view of the list of custom items currently registered
    • register

      public void register(List<CustomItem> item)
      Registers a list of custom items with the manager.

      This method performs the following operations:

      • Validates the input list is not empty
      • Logs the registration process to console
      • Registers all items
      • Initializes item interactions and properties
      Parameters:
      item - the list of custom items to register, must not be null or empty
      Throws:
      IllegalArgumentException - if the item list is null