diff --git a/src/Analysis/Problem/Bukkit/PluginDependenciesProblem.php b/src/Analysis/Problem/Bukkit/PluginDependenciesProblem.php index 4c7d9e72..8c250d10 100644 --- a/src/Analysis/Problem/Bukkit/PluginDependenciesProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginDependenciesProblem.php @@ -72,6 +72,13 @@ public function getDependencyPluginNames(): string */ public function getMessage(): string { + if (count($this->getDependencyPlugins()) === 1) { + return Translator::getInstance()->getTranslation("plugin-dependency-problem", [ + "plugin-name" => $this->getPluginName(), + "dependency-plugin-name" => $this->getDependencyPlugins()[0] + ]); + } + return Translator::getInstance()->getTranslation("plugin-dependencies-problem", [ "plugin-name" => $this->getPluginName(), "dependency-plugin-names" => $this->getDependencyPluginNames() diff --git a/test/tests/auto/Bukkit/PaperPluginDependency1182DuplicateTest.php b/test/tests/auto/Bukkit/PaperPluginDependency1182DuplicateTest.php index 4acbef28..c14e95a2 100644 --- a/test/tests/auto/Bukkit/PaperPluginDependency1182DuplicateTest.php +++ b/test/tests/auto/Bukkit/PaperPluginDependency1182DuplicateTest.php @@ -784,7 +784,7 @@ public function testParseAndAnalyse(): void $this->assertEquals("Minecraft version: 1.18.2", $analysis[0]->getMessage()); - $this->assertEquals("The plugin 'ViaBackwards-4.2.1' is missing the required plugins 'ViaVersion'.", $analysis[1]->getMessage()); + $this->assertEquals("The plugin 'ViaBackwards-4.2.1' is missing the required plugin 'ViaVersion'.", $analysis[1]->getMessage()); $this->assertEquals("Install the plugin 'ViaVersion'.", $analysis[1][0]->getMessage()); $this->assertEquals("Delete the file 'plugins/ViaBackwards-4.2.1.jar'.", $analysis[1][1]->getMessage()); diff --git a/test/tests/auto/Bukkit/PaperPluginDependency1182Test.php b/test/tests/auto/Bukkit/PaperPluginDependency1182Test.php index cd10d398..7e6d1495 100644 --- a/test/tests/auto/Bukkit/PaperPluginDependency1182Test.php +++ b/test/tests/auto/Bukkit/PaperPluginDependency1182Test.php @@ -716,7 +716,7 @@ public function testParseAndAnalyse(): void $this->assertEquals("Minecraft version: 1.18.2", $analysis[0]->getMessage()); - $this->assertEquals("The plugin 'ViaBackwards-4.2.1' is missing the required plugins 'ViaVersion'.", $analysis[1]->getMessage()); + $this->assertEquals("The plugin 'ViaBackwards-4.2.1' is missing the required plugin 'ViaVersion'.", $analysis[1]->getMessage()); $this->assertEquals("Install the plugin 'ViaVersion'.", $analysis[1][0]->getMessage()); $this->assertEquals("Delete the file 'plugins/ViaBackwards-4.2.1.jar'.", $analysis[1][1]->getMessage());