From 5fb00a947c5292bd6a65a21546f23407ba5bff89 Mon Sep 17 00:00:00 2001 From: Konicai <71294714+Konicai@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:49:35 -0400 Subject: [PATCH] Allow BungeeCord plugins that use bungee.yml (#698) Co-authored-by: Emma Alexia Triphora --- src/validate/plugin.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/validate/plugin.rs b/src/validate/plugin.rs index a533c9d88..8f783126f 100644 --- a/src/validate/plugin.rs +++ b/src/validate/plugin.rs @@ -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>, ) -> Result { - 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) }