Allow BungeeCord plugins that use bungee.yml (#698)

Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>
This commit is contained in:
Konicai
2023-09-10 12:49:35 -04:00
committed by GitHub
parent 6288f679b9
commit 5fb00a947c

View File

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