8000 Detect UnsupportedApiVersionErrors in newer versions of Paper by pavog · Pull Request #79 · aternosorg/codex-minecraft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Detect UnsupportedApiVersionErrors in newer versions of Paper #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading < 8000 /span>
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ public function getMessage(): string
*/
public function setMatches(array $matches, mixed $patternKey): void
{
$this->pluginPath = $matches[1];
$this->pluginName = $matches[2];
$this->apiVersion = $matches[3];
$pluginFileName = $matches[1]; // worldedit-bukkit-7.3.4-beta-01.jar
$pluginName = $matches[2]; // worldedit-bukkit-7.3.4-beta-01
$folderName = $matches[3]; // plugins

$this->pluginPath = $folderName . '/' . $pluginFileName;
$this->pluginName = $pluginName;
$this->apiVersion = $matches[4];


$this->addSolution((new PluginInstallDifferentVersionSolution())->setPluginName($this->getPluginName()));
$this->addSolution((new FileDeleteSolution())->setRelativePath($this->getPluginPath()));
Expand All @@ -71,8 +76,10 @@ public function setMatches(array $matches, mixed $patternKey): void
public static function getPatterns(): array
{
return [
'/Could not load \'(plugins[\/\\\]((?!\.jar).*)\.jar)\' in folder \'[^\']+\''
. '\norg\.bukkit\.plugin\.InvalidPluginException\: Unsupported API version ([0-9]+\.[0-9]+)/'
'/Could not load \'plugins[\/\\\](((?!\.jar).*)\.jar)\' in folder \'([^\']+)\''
. '\norg\.bukkit\.plugin\.InvalidPluginException\: Unsupported API version ([0-9]+\.[0-9]+)/',
'/Could not load plugin \'(((?!\.jar).*)\.jar)\' in folder \'([^\']+)\''
. '\norg\.bukkit\.plugin\.InvalidPluginException\: Unsupported API version ([0-9]+\.[0-9]+)/',
];
}
}
Loading
Loading
0