use of cpw.mods.fml.common.versioning.InvalidVersionSpecificationException in project LogisticsPipes by RS485.
the class StorageDrawersInventoryHandler method init.
@Override
public boolean init() {
List<ModContainer> modList = Loader.instance().getModList();
for (ModContainer mod : modList) {
if (mod.getModId().equals("StorageDrawers")) {
try {
VersionRange validVersions = VersionRange.createFromVersionSpec("[1.7.8,)");
ArtifactVersion version = new DefaultArtifactVersion(mod.getVersion());
return validVersions.containsVersion(version);
} catch (InvalidVersionSpecificationException e) {
return false;
}
}
}
return false;
}
Aggregations