Class CosmeticsManager
java.lang.Object
com.storytimeproductions.stweaks.util.CosmeticsManager
Manages the loading and retrieval of cosmetic items from configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionCosmeticsManager(org.bukkit.plugin.java.JavaPlugin plugin) Constructs a new CosmeticsManager and loads cosmetics from configuration. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of all loaded cosmetics.static CosmeticgetCosmetic(String id) Gets a cosmetic by its unique identifier.static CosmeticGets a cosmetic by its unique identifier.voidLoads all cosmetics from the configuration file into memory.
-
Constructor Details
-
CosmeticsManager
public CosmeticsManager(org.bukkit.plugin.java.JavaPlugin plugin) Constructs a new CosmeticsManager and loads cosmetics from configuration.- Parameters:
plugin- the JavaPlugin instance
-
-
Method Details
-
loadCosmetics
public void loadCosmetics()Loads all cosmetics from the configuration file into memory. Invalid or incomplete cosmetics are skipped. -
getAllCosmetics
Gets a list of all loaded cosmetics.- Returns:
- a list of all Cosmetic objects
-
getCosmetic
Gets a cosmetic by its unique identifier.- Parameters:
id- the cosmetic ID- Returns:
- the Cosmetic object, or null if not found
-
getCosmeticById
Gets a cosmetic by its unique identifier.- Parameters:
id- the cosmetic ID- Returns:
- the Cosmetic object, or null if not found
-