mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
update typemanager
This commit is contained in:
parent
7218e804d0
commit
46aea9c4bf
@ -13,8 +13,7 @@ import net.Indyuce.mmoitems.api.Type;
|
||||
import net.Indyuce.mmoitems.manager.ConfigManager.DefaultFile;
|
||||
|
||||
public class TypeManager {
|
||||
private Map<String, Type> map = new LinkedHashMap<>();
|
||||
private ConfigFile config;
|
||||
private final Map<String, Type> map = new LinkedHashMap<>();
|
||||
|
||||
public TypeManager() {
|
||||
reload();
|
||||
@ -30,7 +29,9 @@ public class TypeManager {
|
||||
* and only custom types are registered with a parent.
|
||||
*/
|
||||
DefaultFile.ITEM_TYPES.checkFile();
|
||||
for (String id : (config = new ConfigFile("item-types")).getConfig().getKeys(false))
|
||||
|
||||
ConfigFile config = new ConfigFile("item-types");
|
||||
for (String id : config.getConfig().getKeys(false))
|
||||
if (!map.containsKey(id))
|
||||
try {
|
||||
add(new Type(this, config.getConfig().getConfigurationSection(id)));
|
||||
|
Loading…
Reference in New Issue
Block a user