Search in sources :

Example 1 with CustomItemsConfigFields

use of com.magmaguy.elitemobs.config.customitems.CustomItemsConfigFields in project EliteMobs by MagmaGuy.

the class CustomItem method initializeCustomItems.

/**
 * Initializes all config items on startup. Needs to run after the config initialization as it relies on those values.
 */
public static void initializeCustomItems() {
    for (CustomItemsConfigFields configFields : CustomItemsConfig.getCustomItems().values()) try {
        new CustomItem(configFields);
    } catch (Exception ex) {
        new WarningMessage("Failed to generate custom item in file " + configFields.getFilename() + " !");
        ex.printStackTrace();
    }
}
Also used : WarningMessage(com.magmaguy.elitemobs.utils.WarningMessage) CustomItemsConfigFields(com.magmaguy.elitemobs.config.customitems.CustomItemsConfigFields)

Aggregations

CustomItemsConfigFields (com.magmaguy.elitemobs.config.customitems.CustomItemsConfigFields)1 WarningMessage (com.magmaguy.elitemobs.utils.WarningMessage)1