Skip to content

Commit 183c08d

Browse files
authored
Merge pull request #138 from aternosorg/launcher
Support logs from the official Minecraft launcher
2 parents 76ab749 + c8720c0 commit 183c08d

6 files changed

Lines changed: 11542 additions & 0 deletions

File tree

src/Detective/Detective.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Aternos\Codex\Minecraft\Log\Minecraft\BungeeCord\Waterfall\WaterFallProxyLog;
99
use Aternos\Codex\Minecraft\Log\Minecraft\CustomSkinLoader\CustomSkinLoaderClientLog;
1010
use Aternos\Codex\Minecraft\Log\Minecraft\Geyser\GeyserProxyLog;
11+
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLauncher\MinecraftLauncherClientLog;
1112
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLog;
1213
use Aternos\Codex\Minecraft\Log\Minecraft\Pocketmine\PocketmineServerLog;
1314
use Aternos\Codex\Minecraft\Log\Minecraft\PrismLauncher\PrismLauncherClientLog;
@@ -97,6 +98,7 @@ class Detective extends \Aternos\Codex\Detective\Detective
9798
VanillaNetworkProtocolErrorReportLog::class,
9899

99100
PrismLauncherClientLog::class,
101+
MinecraftLauncherClientLog::class,
100102
CustomSkinLoaderClientLog::class,
101103
];
102104

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLauncher;
4+
5+
use Aternos\Codex\Minecraft\Log\Type\ClientLogTypeInterface;
6+
7+
class MinecraftLauncherClientLog extends MinecraftLauncherLog implements ClientLogTypeInterface
8+
{
9+
10+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLauncher;
4+
5+
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLog;
6+
7+
abstract class MinecraftLauncherLog extends MinecraftLog
8+
{
9+
protected static string $pattern = "/^(\[(\w+): \d{4}(?:-\d{2}){2} (?:\d{2}:?)*\.\d+: [^\]]+\]).*$/";
10+
11+
public function getName(): ?string
12+
{
13+
return "Minecraft Launcher";
14+
}
15+
}

0 commit comments

Comments
 (0)