Added Paper Plugins support (#673)
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
parent
ae3a39ee65
commit
4b07ee2fa8
@ -32,11 +32,14 @@ impl super::Validator for PluginYmlValidator {
|
||||
&self,
|
||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||
) -> Result<ValidationResult, ValidationError> {
|
||||
if archive.by_name("plugin.yml").is_err() {
|
||||
if !archive
|
||||
.file_names()
|
||||
.any(|name| name == "plugin.yml" || name == "paper-plugin.yml")
|
||||
{
|
||||
return Ok(ValidationResult::Warning(
|
||||
"No plugin.yml present for plugin file.",
|
||||
"No plugin.yml or paper-plugin.yml present for plugin file.",
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
Ok(ValidationResult::Pass)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user