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
AnySite rewards can now use %votes% in ordinary commands: 1 for an immediate invocation, or the captured queue size when queued votes are delivered. For example, crazycrates give virtual Vote %votes% %player% requests 149 keys once for a captured batch of 149 entries. No commands are automatically rewritten or collected.
The count includes all captured sites and excludes later arrivals. AnySite conditions/random rolls remain once per invocation; administrators must remove equivalent per-site grants to avoid duplicates. Existing site order, asynchronous completion, pending recovery and default configurations remain unchanged. This covers the Bukkit/Paper/Folia AnySite path; external delivery and live platform acceptance remain unverified.
Validation: new regressions fail on the base (missing immediate count and unresolved queued quantity); 34 focused tests pass. Offline normal clean package passes 3435 unit tests (one skipped) and 8 packaged-artifact checks. Tests mock the reward handler and verify option propagation, existing placeholder expansion, queue/completion boundaries, mixed sites, later arrivals, player isolation and denial/default semantics; they do not prove native command dispatch or recipient-plugin delivery. JAR: 11,132,746 bytes, above the advisory 10 MiB target. No dependency changes.
No actionable comments were generated in the recent review.
Walkthrough
AnySite rewards now receive a votes value: the captured batch size during offline replay, or 1 for immediate rewards. Tests cover replay and invocation behavior. New documentation describes the placeholder and its scope.
Offline replay snapshots the queued votes and passes the batch size to AnySite rewards. Tests cover denied rewards, captured batches, votes arriving during replay, and empty queues. The documentation describes %votes% and its offline replay behavior.
BenCodez/VotingPlugin#1786 — The change passes the captured queued-vote count to one AnySite reward command, which overlaps with the issue’s queued-vote delivery objective. It does not add the issue’s proposed opt-in batching configuration.
Merge Risk: Minimal · up to 0535c
This change adds a %votes% placeholder for AnySite rewards. It resolves to the captured batch size when queued votes are delivered, and to 1 for immediate rewards. Existing behavior and default configurations stay the same. No merge-blocking risk was found in the supplied evidence.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: adding a %votes% placeholder to AnySite rewards. The raw summary and objectives confirm that %votes% resolves to 1 for immediate invocations and to the captured queue …
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.
Full details: Title check
Explanation
The title names the main change: adding a %votes% placeholder to AnySite rewards. The raw summary and objectives confirm that %votes% resolves to 1 for immediate invocations and to the captured queue size for offline vote batches. The title is concise and specific, and a teammate scanning history would understand the primary change.
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; 1 remain after this review.
Recent review details
Context from checks skipped due to timeout: 4
GitHub Check: CodeRabbit
GitHub Check: build
GitHub Check: Analyze (actions)
GitHub Check: Analyze (java-kotlin)
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage.
Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-16T03:12:12.291Z
Learning: Applies to VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/** : Source excerpt:
# Maintainer and AI-agent guide
## Build and verification
All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage. Keep paths and package declarations aligned, and update cross-test imports, resources, and build selectors when moving tests. Preserve package-phase artifact checks and test discovery. Do not widen production APIs to make tests accessible; use narrowly scoped test-only reflection for non-public seams. Platform API fixtures that must retain an external runtime class identity (such as `net.minecraft.network.chat.Component`) stay in that platform package and must not contain test cases.
Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-16T03:12:12.291Z
Learning: Source excerpt:
# Maintainer and AI-agent guide
## Build and verification
All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage. Keep paths and package declarations aligned, and update cross-test imports, resources, and build selectors when moving tests. Preserve package-phase artifact checks and test discovery. Do not widen production APIs to make tests accessible; use narrowly scoped test-only reflection for non-public seams. Platform API fixtures that must retain an external runtime class identity (such as `net.minecraft.network.chat.Component`) stay in that platform package and must not contain test cases.
Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: .github/skills/code-review/SKILL.md:0-0
Timestamp: 2026-11-16T03:11:41.053Z
Learning: Source excerpt:
# VotingPlugin code review
## 3. Trace changed behavior and its contracts
### VotingPlugin voting and network behavior
- Trace proxy/backend ownership, pending-vote caches, acknowledgements,
deduplication, shared storage, and mixed-version peers. Check player-absent
behavior for plugin messaging and reconnect behavior for applicable transports.
Review only methods implemented in the pinned snapshot; do not assume a planned
transport or an open PR has already shipped.
Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-16T03:12:12.291Z
Learning: Source excerpt:
# Maintainer and AI-agent guide
## Proxy vote lifecycle and durability invariants
- For graceful lifecycle, retry, scheduler, reload, shutdown-handoff, and restart-replay paths, preserve exactly-once
vote effects across totals, points, streaks, VoteParty, rewards, broadcasts, backend delivery, and completion
acknowledgement. Stable vote IDs and durable completion fences must prevent duplicates caused by those recoverable
paths. Do not claim universal exactly-once semantics for arbitrary external side effects: if a reward/command succeeds
and the process hard-crashes before its completion record is durably persisted, recovery may repeat that effect. Treat
that as the documented hard-crash transaction boundary, not as an acceptable graceful-lifecycle loss/duplication path.
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.
AnySite rewards can now use
%votes%in ordinary commands:1for an immediate invocation, or the captured queue size when queued votes are delivered. For example,crazycrates give virtual Vote %votes% %player%requests 149 keys once for a captured batch of 149 entries. No commands are automatically rewritten or collected.The count includes all captured sites and excludes later arrivals. AnySite conditions/random rolls remain once per invocation; administrators must remove equivalent per-site grants to avoid duplicates. Existing site order, asynchronous completion, pending recovery and default configurations remain unchanged. This covers the Bukkit/Paper/Folia AnySite path; external delivery and live platform acceptance remain unverified.
Validation: new regressions fail on the base (missing immediate count and unresolved queued quantity); 34 focused tests pass. Offline normal clean package passes 3435 unit tests (one skipped) and 8 packaged-artifact checks. Tests mock the reward handler and verify option propagation, existing placeholder expansion, queue/completion boundaries, mixed sites, later arrivals, player isolation and denial/default semantics; they do not prove native command dispatch or recipient-plugin delivery. JAR: 11,132,746 bytes, above the advisory 10 MiB target. No dependency changes.
Related to #1786.
Summary by CodeRabbit
%votes%placeholder to reflect the number of votes in the current reward invocation.