Repository navigation
Add owner-configured DateVoteMilestones with durable occurrence accounting #1699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BenCodez
wants to merge
28
commits into
master
Choose a base branch
from
codex/date-vote-milestones
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
bca3881
Add durable owner-configured DateVoteMilestones
BenCodez 3c29bd8
Respect reward processing and preserve queued date milestone handles
BenCodez 1f787df
Initialize date vote definitions before proxy ingress
BenCodez 073634b
Reserve date milestone rewards individually before submission
BenCodez bd3c738
Open proxy ingress after accepted vote handlers initialize
BenCodez ff41566
Retain canonical proxy envelopes when date accounting is incomplete
BenCodez 31f5f2e
Require canonical transport identity and preserve original date vote …
BenCodez e2f5503
Preserve normal proxy effects and explicit date accounting identity
BenCodez 57ebcbc
Gate local date ingress and validate ordered progress filters
BenCodez 897f386
Start recovered date vote replay after its consumer is ready
BenCodez 1535e27
Separate date occurrence provenance from normal vote processing time
BenCodez 87545cc
Capture startup Votifier votes before reward pipeline readiness
BenCodez 26441c1
Persist local vote occurrence identities across queue replay
BenCodez 63d9a58
Retain captured votes across cancelled executor admission
BenCodez d6d6dbc
Ship an explicitly disabled date milestone example
BenCodez b4aa30d
Retain started Votifier receipts through shutdown cancellation
BenCodez 42f5819
Normalize added date milestone lines for diff checks
BenCodez cf51409
Retain bounded vote captures across failed overflow transfers
BenCodez 42398de
Retain overflow receipts until vote processing confirms completion
BenCodez f0cc7f1
Preserve date milestone receipts and file ownership across reloads
BenCodez 013c9bb
Align date milestones and add guarded event progress menus
BenCodez 4aa8f3c
Retain captured Votifier votes in bounded shutdown snapshots
BenCodez 071ba3e
Retain capture retirement while queue ownership is pending
BenCodez 0061705
Preserve date-event receipt ownership and integrate current lifecycle
BenCodez 18f2fe9
Retain saturated Votifier receipts until overflow initialization
BenCodez 8f637ef
Complete date milestone owner controls and test-package integration
BenCodez fdcb9e6
Integrate DateVoteMilestones with current master
BenCodez 334a00e
Fix offline date milestone placeholder identity
BenCodez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
VotingPlugin/src/main/java/com/bencodez/votingplugin/commands/DateVoteMilestoneCommands.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package com.bencodez.votingplugin.commands; | ||
|
|
||
| import com.bencodez.advancedcore.api.command.CommandHandler; | ||
| import com.bencodez.simpleapi.command.TabCompleteHandler; | ||
| import com.bencodez.votingplugin.VotingPluginMain; | ||
| import com.bencodez.votingplugin.specialrewards.datemilestones.DateVoteMilestones.AdminAction; | ||
| import org.bukkit.command.CommandSender; | ||
|
|
||
| /** Exact-target administration; storage and confirmed completion belong to the manager. */ | ||
| final class DateVoteMilestoneCommands { | ||
| private DateVoteMilestoneCommands() { } | ||
|
|
||
| static void register(VotingPluginMain plugin, String adminPermission) { | ||
| // The SDK only matches registered variable tokens; its built-in player token also rewrites fuzzy names. | ||
| for (String token : new String[] { "(player-id)", "(date-event)", "(vote-count)", "(date-milestone)" }) | ||
| TabCompleteHandler.getInstance().addTabCompleteOption(token, new java.util.ArrayList<>()); | ||
| for (AdminAction action : AdminAction.values()) { | ||
| String[] arguments = switch (action) { | ||
| case Status, Preview -> new String[] { "DateVoteMilestone&DVM", action.name(), "(player-id)", "(date-event)" }; | ||
| case SetVotes -> new String[] { "DateVoteMilestone&DVM", action.name(), "(player-id)", "(date-event)", "(vote-count)" }; | ||
| case Force, ForceNoLimits -> new String[] { "DateVoteMilestone&DVM", action.name(), "(player-id)", "(date-event)", "(date-milestone)" }; | ||
| }; | ||
| String description = switch (action) { | ||
| case Status, Preview -> "Inspect date event counts and reward fences without submitting rewards"; | ||
| case SetVotes -> "Set date event count (0-4096), preserving receipt IDs and reward fences"; | ||
| case Force -> "Force selected date milestones, preserving prior submission and uncertain reservation fences"; | ||
| case ForceNoLimits -> "Repeat submitted date milestones; uncertain reservations remain blocked"; | ||
| }; | ||
| CommandHandler handler = new CommandHandler(plugin, arguments, | ||
| "VotingPlugin.Commands.AdminVote.DateVoteMilestone." + action.name() + "|" + adminPermission, description) { | ||
| @Override public void execute(CommandSender sender, String[] args) { | ||
| var manager = plugin.getDateVoteMilestones(); | ||
| if (manager == null) { sender.sendMessage("Date milestones are unavailable."); return; } | ||
| manager.administer(sender, action, args[2], args[3], args.length > 4 ? args[4] : null); | ||
| } | ||
| }; | ||
| handler.setAllowMultiplePermissions(true); | ||
| plugin.getAdminVoteCommand().add(handler); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.