You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a standalone Fabric dedicated-server module for Minecraft 1.21.1 and Java 21. It initializes local configuration and uses the shared immutable player identity for server-thread lookups.
Load optional read-only VoteSites.yml rules with deterministic case-insensitive matching by priority and file order. Evaluate interval and daily delay boundaries with an explicit clock and zone.
Leave bootstrap active when the rule file is absent, empty, or invalid. Invalid documents disable the entire snapshot and produce a bounded diagnostic.
Vote receipt, persistence, commands, proxy delivery, and rewards remain future work. This bootstrap registers no VotifierPlus callback.
Validation
Gradle 8.8 and Loom 1.7.4 built the remapped JAR and passed 11 tests for lifecycle, lookup, strict configuration parsing, and interval/daily delay boundaries.
Native Minecraft 1.21.1 with Fabric Loader 0.16.14 and Fabric API 0.116.5+1.21.1 started and stopped cleanly in all three scenarios: absent, valid, and malformed optional configuration. The malformed Unicode fixture loaded no rules. The smoke runs did not connect a player or deliver votes.
Java 21 Maven focused checks passed 22 tests. The full clean package discovered 3,369 suite tests with one skip and passed 8 packaged-artifact checks. The existing universal JAR emitted its advisory size warning.
Tested head 47b7fca3113f7da097bdc3980ffe6f57f479adbb, remapped Fabric JAR SHA-256 b056e3a63fa8e552a5337e6707f962d59fba0dd0ca87c57027d25746d515c07e. The JAR includes one pinned SnakeYAML 2.7 nested dependency.
Summary by CodeRabbit
New Features
Added a standalone Fabric server bootstrap for Minecraft 1.21.1, with configurable startup and shutdown logging.
Added online-player lookups processed on the server thread; lookups are unavailable when the bootstrap is inactive.
Added optional, read-only vote-site rules with alias matching, priority handling, and voting-delay checks. The bootstrap does not receive or count votes or register voting commands.
Documentation
Added setup, installation, configuration, compatibility, and feature-scope information for the Fabric bootstrap.
No actionable comments were generated in the recent review.
Walkthrough
Adds a Fabric dedicated-server bootstrap, validated configuration loading, read-only vote-site rules, and queued online-player lookups. The runtime processes lookups on the server thread and returns identities for online players.
Configures the Fabric Loom project for Java 21, declares Fabric and Minecraft versions, adds mod metadata, includes shared source files and the license in the build, configures JUnit Platform, and ignores root-level Gradle, build, and run directories.
Loads or installs configuration defaults, validates paths and properties, and tests default creation, preservation of existing settings, and rejection of invalid configuration files.
Vote-site rules and delay gates VotingPlugin-Fabric/src/main/java/com/bencodez/votingplugin/fabric/FabricVoteSite.java, VotingPlugin-Fabric/src/main/java/com/bencodez/votingplugin/fabric/FabricVoteSites.java, VotingPlugin-Fabric/src/test/java/com/bencodez/votingplugin/tests/fabric/FabricVoteSitesTest.java, VotingPlugin-Fabric/README.md
Loads and validates bounded YAML vote-site rules, resolves identifiers and aliases, parses delays, and applies interval and daily eligibility rules. Tests cover validation, matching, and time boundaries. The README describes the read-only rules and their behavior.
Server lifecycle and player lookup VotingPlugin-Fabric/src/main/java/com/bencodez/votingplugin/fabric/FabricServerRuntime.java, VotingPlugin-Fabric/src/main/java/com/bencodez/votingplugin/fabric/FabricVotingPlugin.java, VotingPlugin-Fabric/src/test/java/com/bencodez/votingplugin/tests/fabric/FabricBootstrapTest.java, VotingPlugin-Fabric/README.md
Wires runtime creation, ticking, and shutdown to server lifecycle events. Queued player lookups run on the server thread, with limits and exceptional completion on lookup failures, rejection, or shutdown. Tests cover dispatch and lifecycle behavior. The README documents setup and lookup behavior.
sequenceDiagram
participant Caller
participant FabricVotingPlugin
participant FabricServerRuntime
participant MinecraftServer
Caller->>FabricVotingPlugin: onlinePlayer(UUID)
FabricVotingPlugin->>FabricServerRuntime: enqueue lookup
FabricVotingPlugin->>FabricServerRuntime: tick at end of server tick
FabricServerRuntime->>MinecraftServer: resolve online player
MinecraftServer-->>FabricServerRuntime: player or no match
FabricServerRuntime-->>Caller: complete future with optional identity
Loading
Merge Risk: Minimal · up to 47b7f
This adds a standalone Fabric server bootstrap with configuration loading, read-only vote-site rules, and bounded online-player lookups. It leaves vote handling, persistence and rewards for future work, so existing behavior is unaffected. No actionable merge-blocking issue was identified in the supplied changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Add standalone Fabric 1.21.1 bootstrap" matches the main change in the changeset. The PR adds a new VotingPlugin-Fabric module with a dedicated-server Fabric entry point, configuration load…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title "Add standalone Fabric 1.21.1 bootstrap" matches the main change in the changeset. The PR adds a new VotingPlugin-Fabric module with a dedicated-server Fabric entry point, configuration loading, server lifecycle handling, and bounded online-player lookups for Minecraft 1.21.1. The title is short, specific, and free of file lists or vague terms. It omits the vote-site rules, but those are secondary to the bootstrap.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
[warning] 110-110: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: site.matches(identifier)
Note: [CWE-1333] Inefficient Regular Expression Complexity.
[warning] 59-59: Avoid user-generated class names for reflection
Context: Class.forName(PACKAGE + "FabricVoteSites")
Note: [CWE-470] Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').
(unsafe-reflection-java)
[warning] 62-62: Avoid user-generated class names for reflection
Context: Class.forName(PACKAGE + "FabricServerRuntime")
Note: [CWE-470] Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').
[warning] 175-175: Avoid user-generated class names for reflection
Context: Class.forName(TYPE)
Note: [CWE-470] Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
VoteSites.ymlrules with deterministic case-insensitive matching by priority and file order. Evaluate interval and daily delay boundaries with an explicit clock and zone.Validation
47b7fca3113f7da097bdc3980ffe6f57f479adbb, remapped Fabric JAR SHA-256b056e3a63fa8e552a5337e6707f962d59fba0dd0ca87c57027d25746d515c07e. The JAR includes one pinned SnakeYAML 2.7 nested dependency.Summary by CodeRabbit