Features
VIP points and rank shop
A global VIP points balance and a shop that sells ranks with confirmation, safe purchase rules, audit history and crash recovery.
The vippoints module keeps a global integer balance per player (never negative, the same on every server) and a shop of templates that buy ranks from the ranks module.
Requirements
Enable modules.vippoints.enabled. Selling ranks needs the ranks module READY; without it balances work but the shop answers that ranks are unavailable.
Purchase rules
The level of a rank is its weight. Only active, unconditional grants of ranks sold in the shop count:
- Same rank: time is added to the current grant (a permanent template makes it permanent). If it is already permanent, the purchase is blocked.
- Higher shop rank, or a different one with the same weight: blocked.
- Lower shop ranks: removed after granting the new one.
- Staff, hidden, owner and default ranks cannot be sold.
The confirmation keeps the shown price: if an admin changes it between buy and confirm, the purchase is refused.
Safety
- Every change reads the record and writes it with compare-and-set on its revision, identical on MongoDB, MySQL, MariaDB and SQLite.
- A purchase is a recoverable sequence: the price is taken and the purchase stored as pending in the same write; then the rank is granted with reason
vipshop:<operation-id>; then the pending mark is cleared. If the rank is refused, points are refunded. - If a server crashes mid-purchase, the pending purchase is resolved on the player's next join, next purchase or with
/vpadmin recover: completed if the grant exists, refunded otherwise.
Configuration
vippoints.yml only affects local behavior: language, confirm-seconds (5–300), recovery-delay-seconds (60–86400), refresh-seconds (30–3600) and the label and aliases of each command. The global maximum balance (1000000 by default, up to 1000000000) is stored in the database and changed with /vptemplate max.
Placeholder
%sofycore_vippoints% shows the balance of the connected player from memory; it is empty while loading.