Skip to content
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
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Detective/Detective.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Purpur\PurpurCrashReportLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Purpur\PurpurServerLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Spigot\OldSpigotServerLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Spigot\SpigotCrashReportLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Spigot\SpigotServerLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Fabric\FabricClientLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Fabric\FabricCrashReportLog;
Expand Down Expand Up @@ -86,6 +87,7 @@ class Detective extends \Aternos\Codex\Detective\Detective
GlowstoneServerLog::class,
QuiltServerLog::class,

SpigotCrashReportLog::class,
PaperCrashReportLog::class,
PurpurCrashReportLog::class,
FoliaCrashReport::class,
Expand Down
28 changes: 28 additions & 0 deletions src/Log/Minecraft/Vanilla/Bukkit/Spigot/SpigotCrashReportLog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\Spigot;

use Aternos\Codex\Detective\DetectorInterface;
use Aternos\Codex\Detective\MultiPatternDetector;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaCrashReportTrait;
use Aternos\Codex\Minecraft\Log\Type\CrashReportLogTypeInterface;

class SpigotCrashReportLog extends SpigotLog implements CrashReportLogTypeInterface
{
use VanillaCrashReportTrait;

/**
* @return DetectorInterface[]
*/
public static function getDetectors(): array
{
return [
(new MultiPatternDetector())
->addPattern("/^---- Minecraft Crash Report ----$/m")
->addPattern("/^\s+Known server brands: Spigot$/m"),
(new MultiPatternDetector())
->addPattern("/^---- Minecraft Crash Report ----$/m")
->addPattern("/^\s+Is Modded: Definitely; Server brand changed to 'Spigot'$/m")
];
}
}
Loading