Interface CosmeticRegistry
public interface CosmeticRegistry
Represents the registry for all StarCosmetics Cosmetics.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddStructure(@NotNull File file) Adds a Structure to the registry.voidaddStructure(@NotNull InputStream stream) Adds a Structure to the registry.default @NotNull List<CosmeticLocation<?>>Fetches a list of all registered CosmeticLocations.@NotNull List<CosmeticLocation<?>>Fetches a list of Locations for a specific Cosmetic.default @NotNull List<CosmeticLocation<?>>Fetches a list of Locations for a specific Cosmetic.Fetches a list of all registered Cosmetic Parents.Fetches a Map of all Pet Types to their information.@NotNull Set<StructureInfo>Fetches a set of all structures available for use.default @Nullable CosmeticLocation<?>getByFullKey(@Nullable String key) Fetches a CosmeticLocation by its full key.@Nullable CosmeticgetByNamespace(@NotNull String key) Fetches a Cosmetic by its namespace.default @Nullable PetInfogetPetInfo(@Nullable PetType type) Fetches a PetInfo by its PetType.
-
Method Details
-
getAllFor
@NotNull @NotNull List<CosmeticLocation<?>> getAllFor(@Nullable @Nullable Class<? extends Cosmetic> parentClass) Fetches a list of Locations for a specific Cosmetic.- Parameters:
parentClass- Parent Cosmetic Class- Returns:
- List of Cosmetic Locations
-
getAllFor
Fetches a list of Locations for a specific Cosmetic.- Parameters:
parent- Parent Cosmetic- Returns:
- List of Cosmetic Locations
-
getAllCosmetics
Fetches a list of all registered CosmeticLocations.- Returns:
- List of Cosmetic Locations
-
getByFullKey
Fetches a CosmeticLocation by its full key.- Parameters:
key- Full Key- Returns:
- Cosmetic Location found, or null if not found
-
getAllParents
Fetches a list of all registered Cosmetic Parents.- Returns:
- List of Registered Cosmetic Parents
-
getByNamespace
Fetches a Cosmetic by its namespace.- Parameters:
key- Cosmetic Namespace- Returns:
- Cosmetic Parent
-
getAvailableStructures
Fetches a set of all structures available for use.- Returns:
- Set of Structures
-
addStructure
Adds a Structure to the registry.- Parameters:
file- Structure File- Throws:
IllegalArgumentException- If the file is not a valid Structure File
-
addStructure
Adds a Structure to the registry.- Parameters:
stream- Structure InputStream
-
getAllPets
Fetches a Map of all Pet Types to their information.- Returns:
- Pet Information Map
-
getPetInfo
Fetches a PetInfo by its PetType.- Parameters:
type- Pet Type- Returns:
- Pet Information
-