Skip to content

Commit

Permalink
fix[modrinth]: apply changes here
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Feb 2, 2024
1 parent fec4d9d commit abe0b2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sources/modrinth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl<'a> ModrinthAPI<'a> {
))
}

pub fn get_modrinth_name(&self) -> Option<String> {
pub fn get_modrinth_name(&self) -> Option<&str> {
self.0.server.jar.get_modrinth_name()
}

Expand All @@ -245,12 +245,12 @@ impl<'a> ModrinthAPI<'a> {
let is_vanilla = matches!(self.0.server.jar, ServerType::Vanilla {});

let mcver = &self.0.mc_version();
let loader = self.0.server.jar.get_modrinth_name();
let loader = self.get_modrinth_name();

list.iter()
.filter(|v| is_proxy || v.game_versions.contains(mcver))
.filter(|v| {
if let Some(n) = &loader {
if let Some(n) = loader {
v.loaders
.iter()
.any(|l| l == "datapack" || l == n || (l == "fabric" && n == "quilt"))
Expand Down

0 comments on commit abe0b2b

Please sign in to comment.