Fixed an issue with key combos loading

This commit is contained in:
Indyuce 2022-11-10 16:49:43 +01:00
parent e056f2c34f
commit c8977a0ec9

View File

@ -33,7 +33,7 @@ public class ComboMap {
Validate.isTrue(spellSlot >= 0, "Spell slot must be at least 0"); Validate.isTrue(spellSlot >= 0, "Spell slot must be at least 0");
Validate.isTrue(!combos.values().contains(spellSlot), "There is already a key combo with the same skill slot"); Validate.isTrue(!combos.values().contains(spellSlot), "There is already a key combo with the same skill slot");
KeyCombo combo = new KeyCombo(); KeyCombo combo = new KeyCombo();
for (String str : config.getStringList("combos." + key)) for (String str : config.getStringList(key))
combo.registerKey(PlayerKey.valueOf(UtilityMethods.enumName(str))); combo.registerKey(PlayerKey.valueOf(UtilityMethods.enumName(str)));
combos.put(combo, spellSlot); combos.put(combo, spellSlot);