You've already forked AstralRinth
forked from didirus/AstralRinth
Allow BungeeCord plugins that use bungee.yml (#698)
Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>
This commit is contained in:
@@ -19,8 +19,6 @@ impl super::Validator for PluginYmlValidator {
|
|||||||
"spigot",
|
"spigot",
|
||||||
"paper",
|
"paper",
|
||||||
"purpur",
|
"purpur",
|
||||||
"bungeecord",
|
|
||||||
"waterfall",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,11 +66,14 @@ impl super::Validator for BungeeCordValidator {
|
|||||||
&self,
|
&self,
|
||||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||||
) -> Result<ValidationResult, ValidationError> {
|
) -> Result<ValidationResult, ValidationError> {
|
||||||
if archive.by_name("bungee.yml").is_err() {
|
if !archive
|
||||||
|
.file_names()
|
||||||
|
.any(|name| name == "plugin.yml" || name == "bungee.yml")
|
||||||
|
{
|
||||||
return Ok(ValidationResult::Warning(
|
return Ok(ValidationResult::Warning(
|
||||||
"No bungee.yml present for plugin file.",
|
"No plugin.yml or bungee.yml present for plugin file.",
|
||||||
));
|
));
|
||||||
}
|
};
|
||||||
|
|
||||||
Ok(ValidationResult::Pass)
|
Ok(ValidationResult::Pass)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user