mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-11 21:56:55 +00:00
fix active slot resolver resolving null on wrong values
This commit is contained in:
@@ -378,12 +378,12 @@ public class EnchantioConfig {
|
||||
private Set<EquipmentSlotGroup> getEquipmentSlotGroups(@NotNull List<String> slots) {
|
||||
Set<EquipmentSlotGroup> equipmentSlotGroups = new HashSet<>();
|
||||
for (String slot : slots) {
|
||||
try {
|
||||
EquipmentSlotGroup equipmentSlotGroup = EquipmentSlotGroup.getByName(slot.toUpperCase(Locale.ENGLISH));
|
||||
equipmentSlotGroups.add(equipmentSlotGroup);
|
||||
} catch (IllegalArgumentException e) {
|
||||
EquipmentSlotGroup equipmentSlotGroup = EquipmentSlotGroup.getByName(slot);
|
||||
if (equipmentSlotGroup == null) {
|
||||
logger.warning(slot + " is not a valid equipment slot group");
|
||||
continue;
|
||||
}
|
||||
equipmentSlotGroups.add(equipmentSlotGroup);
|
||||
}
|
||||
return equipmentSlotGroups;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user