mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-07 12:11:22 +01:00
Changed modifier group config format
This commit is contained in:
parent
162f0cf3c4
commit
01043ac12b
@ -37,8 +37,8 @@ public class ModifierGroup extends ModifierNode implements PreloadedObject {
|
||||
final ModifierGroup parent = (ModifierGroup) getReferenceNode();
|
||||
children = parent.children;
|
||||
final ConfigurationSection config = configObject instanceof ConfigurationSection ? (ConfigurationSection) configObject : null;
|
||||
min = config != null && config.contains("min-modifiers") ? config.getInt("min-modifiers") : parent.min;
|
||||
max = config != null && config.contains("max-modifiers") ? config.getInt("max-modifiers") : parent.max;
|
||||
min = config != null && config.contains("min") ? config.getInt("min") : parent.min;
|
||||
max = config != null && config.contains("max") ? config.getInt("max") : parent.max;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -47,8 +47,8 @@ public class ModifierGroup extends ModifierNode implements PreloadedObject {
|
||||
postLoadAction.cacheConfig(config);
|
||||
Validate.isTrue(config.contains("modifiers"), "You must provide a modifier list");
|
||||
|
||||
min = config.getInt("min-modifiers");
|
||||
max = config.getInt("max-modifiers", config.getConfigurationSection("modifiers").getKeys(false).size());
|
||||
min = config.getInt("min");
|
||||
max = config.getInt("max", config.getConfigurationSection("modifiers").getKeys(false).size());
|
||||
|
||||
children = new ArrayList<>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user