Skip to content

Add configurable stat synchronization - #33

Closed
AryanGupta833 wants to merge 2 commits into
D3ller:developfrom
AryanGupta833:feat/configuration-sync-toggles
Closed

AryanGupta833 wants to merge 2 commits into
D3ller:developfrom
AryanGupta833:feat/configuration-sync-toggles

Conversation

@AryanGupta833

Copy link
Copy Markdown
Contributor

Summary

Adds configurable synchronization settings for shared health, food, and potion effects.

Changes

  • Add configuration.yml with health, food, and potion synchronization toggles.
  • Add /sharedgroup enable <health|food|potions> to enable synchronization.
  • Add /sharedgroup disable <health|food|potions> to disable synchronization.
  • Persist configuration changes to disk.
  • Restrict configuration commands to server operators.
  • Update health synchronization behavior and add food and potion synchronization listeners.

Testing

  • .\gradlew.bat clean test build — passed.

Notes

Live Minecraft server behavior has not yet been verified.

@D3ller D3ller linked an issue Oct 14, 2026 that may be closed by this pull request
@D3ller D3ller assigned D3ller and unassigned D3ller Oct 14, 2026
@D3ller D3ller added the invalid This doesn't seem right label Oct 14, 2026
@D3ller
D3ller self-requested a review October 14, 2026 15:52

@D3ller D3ller left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for your contribution and the time you spent working on this PR!

However, this PR goes beyond the scope of issue #23. The issue was only about adding a configuration file and commands to enable or disable synchronization, not implementing the food and potion synchronization systems themselves.

I'd prefer to keep these features in separate PRs so they can be reviewed and tested independently.

Could you please limit this PR to the original issue's scope?

Thanks for understanding!

@AryanGupta833

Copy link
Copy Markdown
Contributor Author

Hi, thanks for the feedback! I'm sorry for taking the PR beyond the scope of issue #23 and creating extra work during the review.

I've updated the PR by removing the food and potion synchronization implementations and their registrations, and restored the original behavior in Start.java.

The configuration file, configuration manager, enable/disable commands, and health synchronization toggle remain in place. I've also verified that the updated code passes the build and tests.

Sorry again for the oversight, and thank you for your time and guidance. Could you please review the updated changes when you get a chance?

@AryanGupta833

Copy link
Copy Markdown
Contributor Author

Hi! I've addressed the scope feedback and pushed the cleanup in commit 6a4c6b1.

I also noticed that the required “Source branch must be develop” check is failing because this PR currently targets main from my feature branch. I checked the workflow and confirmed that it explicitly requires the source branch to be named develop.

Could you please clarify the expected workflow for contributions from forks? I want to make sure I follow the repository's branching policy without introducing unrelated changes or affecting the shared develop branch.

Thanks!

@AryanGupta833
AryanGupta833 requested a review from D3ller October 14, 2026 17:10
@D3ller

D3ller commented Oct 14, 2026

Copy link
Copy Markdown
Owner

I'm gonna check this tomorrow.

@D3ller
D3ller changed the base branch from main to develop October 15, 2026 09:49
@D3ller D3ller added documentation Improvements or additions to documentation enhancement New feature or request and removed invalid This doesn't seem right labels Oct 15, 2026
D3ller added a commit that referenced this pull request Oct 15, 2026
Add /sharedgroup enable and disable to toggle health synchronization,
stored in configuration.yml. Both commands are refused during a game.

When health is disabled, damage, regeneration, lethal hits and deaths
stay individual: SharedHealthService, the resurrect listener and the
death fallback all check the toggle.

Co-authored-by: AryanGupta833 <206203305+AryanGupta833@users.noreply.github.com>
@D3ller

D3ller commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Merged via #44, thanks!

@D3ller D3ller closed this Oct 15, 2026
D3ller added a commit that referenced this pull request Oct 15, 2026
feat: add configurable stat synchronization (#33) (#44)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configuration.yml file

2 participants