mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-06 22:17:40 +01:00
Added extra safety checks to TargetYml
This commit is contained in:
parent
bb93dfe7af
commit
fc0b9d8ed4
@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
public class TargetYml extends YamlBaseConfig {
|
||||
@ -40,6 +41,8 @@ public class TargetYml extends YamlBaseConfig {
|
||||
materials.add(Material.getMaterial(materialName.toUpperCase()));
|
||||
});
|
||||
|
||||
materials.removeIf(Objects::isNull);
|
||||
|
||||
return materials;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user