Skip to content

feat: per-action points, milestone rewards, click-to-claim - #5

Merged
JustinasLa merged 3 commits into
mainfrom
feat/milestone-bar
Sep 10, 2026
Merged

JustinasLa merged 3 commits into
mainfrom
feat/milestone-bar

Conversation

@JustinasLa

@JustinasLa JustinasLa commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bar = bar.max points (20), 1 point per action; reward claimable every bar.reward-every (10)
  • Activities: every / points / daily-cap replace daily-goal / points
  • New quest activity, fed by /activity add <player> quest 1 from the quests plugin
  • Rewards claimed by clicking the chest in /activity; same commands each milestone
  • rewarded/pending-reward in players.yml → claimed count; join now only nudges
  • Placeholders: %activity_max%, %activity_claimable%; percent now a real percent

Math check

5 vote sites + 5 daily quests = 10/day → 2 days maxes 20. Skip one source → 4 days.

Test plan

  • mvn clean package green, 43 tests pass
  • In-game: vote → +1 chat, 10 pts → REWARD READY, click chest → commands run, lore updates

Bar is now bar.max points (default 20) filled 1 point per action, with a
claimable reward every bar.reward-every points (default 10). Each activity
has every/points/daily-cap instead of daily-goal/points. Rewards are claimed
by clicking the chest in /activity rather than auto-granted, so the
pending-reward flag and join-time payout go away.

Adds a 'quest' activity fed by /activity add from the quests plugin.
Clamp stored points to bar.max on load and on every get(), seed 'claimed'
from the legacy 'rewarded' flag, and refuse an activity that still uses
'daily-goal' instead of every/points/daily-cap. Without these an
unconverted players.yml could pay out ten rewards on one click and an
unconverted config.yml could fill the bar with a single action.

worth() moves onto ActivityDef, where its inputs live.
…ssage

A pre-milestone players.yml is now loaded with every milestone its clamped
points reach already marked claimed, so an upgrade makes nothing instantly
claimable. PlaceholderAPI reads clamp to bar.max as well, since peek()
skips the clamp get() does. A claim whose commands could not run tells the
player, not just the console. Sound comments describe the new per-point
meaning.
@JustinasLa
JustinasLa merged commit 94d58cc into main Sep 10, 2026
1 check passed
@JustinasLa
JustinasLa deleted the feat/milestone-bar branch September 10, 2026 19:24
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.

1 participant