Implement production network-wide multi-currency economy - #121
Open
remdui wants to merge 63 commits into
Open
Conversation
remdui
marked this pull request as ready for review
August 6, 2026 15:35
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements a production-grade, MySQL-authoritative Economy feature and integrates Lottery with explicit built-in or legacy Vault backends. The implementation has received a second financial-integrity review focused on cross-server consistency, replay safety, identity ownership, Redis outages, concurrent transactions, and failure recovery.
HauntedMC currency topology
The implementation supports the intended network model without currency-name special cases:
GLOBAL— one balance shared across every gamemode and physical server.SERVERscope — available everywhere, with a separate balance per logical gamemode.SERVERscope — available everywhere, with a separate balance per logical gamemode.SERVERscope and the primary Vault currency for that gamemode.SERVER,GROUP, orGLOBALscope.An exact HauntedMC example configuration and a production deployment checklist are included in the feature documentation.
Authoritative transaction model
Idempotency and replay protection
(source, idempotency key).IDEMPOTENCY_CONFLICTand applies nothing.Network-wide synchronization
Identity and configuration integrity
Player and administration features
/economy verifydetects invalid balances, invalid journal entries, orphan rows, identity mismatches, accounts without creation history, and transactions without entries.Vault
FAIL,SKIP,REPLACE) are implemented.Lottery
economy.backend: BUILTIN|VAULT; there is no automatic backend fallback.VAULTremains the compatibility default for legacy servers.Framework, tests, and documentation
EconomyApi, cache-only PlaceholderAPI integration, ORM entities, permissions, configuration, and operational documentation.Final validation
Validated on head
ad5db54822060b044277c1a2f5617107d9a4c751against currentmain(4900a55a21cc52ba826c82bb007447454d9a60df):maindid not advance during the final review.