Added extra safety checks to TargetYml

This commit is contained in:
Auxilor 2021-10-23 18:57:59 +01:00
parent bb93dfe7af
commit fc0b9d8ed4

View File

@ -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;
}
}