Class CustomItemManager
java.lang.Object
com.github.pinont.singularitylib.api.manager.CustomItemManager
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 Summary
FieldsModifier and TypeFieldDescriptionList of registered custom items managed by this manager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of registered custom items.voidregister(List<CustomItem> item) Registers a list of custom items with the manager.
-
Field Details
-
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
Gets the list of registered custom items.- Returns:
- an unmodifiable view of the list of custom items currently registered
-
register
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
-