Package fr.maxlego08.menu.api.pattern
Interface PatternManager
public interface PatternManager
The PatternManager interface provides methods for managing patterns used in inventories.
-
Method Summary
Modifier and TypeMethodDescriptiongetPattern(String name) Retrieves a pattern by its name.Retrieves the list of registered patterns.loadPattern(File file) Loads a pattern from a file.voidLoads all registered patterns.voidregisterPattern(Pattern pattern) Registers a new pattern.voidunregisterPattern(Pattern pattern) Unregisters a pattern.
-
Method Details
-
getPatterns
Collection<Pattern> getPatterns()Retrieves the list of registered patterns.- Returns:
- The collection of registered patterns.
-
getPattern
Retrieves a pattern by its name.- Parameters:
name- The name of the pattern to retrieve.- Returns:
- An optional containing the pattern, if it exists.
-
loadPattern
Loads a pattern from a file.- Parameters:
file- The file from which to load the pattern.- Returns:
- The loaded
Pattern. - Throws:
fr.maxlego08.menu.exceptions.InventoryException- If an error occurs while loading the pattern.
-
loadPatterns
void loadPatterns()Loads all registered patterns.
-