Skip to content

Commit

Permalink
Merge pull request #38 from aternosorg/magma-1-16
Browse files Browse the repository at this point in the history
Detect magma 1.16.5
  • Loading branch information
matthi4s authored Oct 28, 2022
2 parents 899cf92 + f1e5815 commit b5ffdf6
Show file tree
Hide file tree
Showing 5 changed files with 2,213 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Analysis/Information/Magma/MagmaVersionInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public function __construct()
*/
public static function getPatterns(): array
{
return ['/This server is running Magma version ([0-9a-f]+)/'];
return ['/This server is running Magma version (?:git-Magma-[0-9\.a-zA-Z]+-)?([0-9a-f]+)/'];
}
}
4 changes: 1 addition & 3 deletions src/Log/Minecraft/Vanilla/Forge/Magma/MagmaLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
*/
abstract class MagmaLog extends ForgeLog
{
protected static string $prefixPattern = '(\[(?:[0-9]{2}\:?){3}\] \[[^\/]+\/(\w+)\](?: \[[^\]]+\])?\:) ';

/**
* @return DetectorInterface[]
*/
public static function getDetectors(): array
{
return [
(new SinglePatternDetector())->setPattern('/' . static::$prefixPattern . 'This server is running Magma version/')
(new SinglePatternDetector())->setPattern('/This server is running Magma version/')
];
}

Expand Down
Loading

0 comments on commit b5ffdf6

Please sign in to comment.