Allow BungeeCord plugins that use bungee.yml (#698)
Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>
This commit is contained in:
parent
6288f679b9
commit
5fb00a947c
@ -19,8 +19,6 @@ impl super::Validator for PluginYmlValidator {
|
||||
"spigot",
|
||||
"paper",
|
||||
"purpur",
|
||||
"bungeecord",
|
||||
"waterfall",
|
||||
]
|
||||
}
|
||||
|
||||
@ -68,11 +66,14 @@ impl super::Validator for BungeeCordValidator {
|
||||
&self,
|
||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||
) -> 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(
|
||||
"No bungee.yml present for plugin file.",
|
||||
"No plugin.yml or bungee.yml present for plugin file.",
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
Ok(ValidationResult::Pass)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user