Skip to content

Require the log prefix for Bukkit version line detection - #191

Merged
pavog merged 1 commit into
masterfrom
bukkit-log-identifier-prefix
Nov 13, 2026
Merged

pavog merged 1 commit into
masterfrom
bukkit-log-identifier-prefix

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member

Bukkit servers are detected by their startup line, built as PREFIX This server is running <logIdentifier>.
Paper, Purpur and Folia added a second identifier with a top-level |, which turned the pattern into two alternatives:

/PREFIX This server is running (?:Paper|CraftBukkit) version git-Paper|This server is running Paper version/

The second alternative has no prefix, so This server is running Paper version anywhere in a log was enough to detect it as Paper.
Current versions (Paper version 1.21.1-116-master@e7e1ab5) were only detected through that alternative.

This PR replaces the $logIdentifier string with a $logIdentifiers array and creates one prefixed detector per identifier.
Paper, Purpur and Folia now list the old CraftBukkit version git-... name and their own ... version name as separate entries.

This depends on #: Paper 26.3 console logs only keep their detection because the prefix now matches [16:24:27 INFO]: .

No expected output changed, all test logs are detected as before.
There is no test log for an unprefixed version line, because none of the real logs has one.

Changes

  • replace $logIdentifier with $logIdentifiers and create one prefixed detector per entry
  • split the paper, purpur and folia identifiers into the craftbukkit name and their own name
  • add docblocks with example startup lines

@pavog
pavog requested a review from JulianVennen November 13, 2026 15:39
@pavog
pavog merged commit 2eb3142 into master Nov 13, 2026
3 checks passed
@pavog
pavog deleted the bukkit-log-identifier-prefix branch November 13, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants