!Fixed /mi reload

This commit is contained in:
Indyuce 2020-09-26 23:30:11 +02:00
parent da3bc90f6c
commit def0477894
2 changed files with 3 additions and 3 deletions

View File

@ -177,8 +177,6 @@ public class MMOItems extends JavaPlugin {
findRpgPlugin();
templateManager.reload();
/*
* After tiers, sets and upgrade templates are loaded, MI template data
* can be fully loaded

View File

@ -248,7 +248,9 @@ public class TemplateManager {
FileConfiguration config = type.getConfigFile().getConfig();
for (String key : config.getKeys(false))
try {
registerTemplate(new MMOItemTemplate(type, config.getConfigurationSection(key)));
MMOItemTemplate template = new MMOItemTemplate(type, config.getConfigurationSection(key));
template.postLoad();
registerTemplate(template);
} catch (IllegalArgumentException exception) {
MMOItems.plugin.getLogger().log(Level.INFO, "Could not load item template '" + key + "': " + exception.getMessage());
}