-
Notifications
You must be signed in to change notification settings - Fork 6
features offline pay
When sending a /pay <player> <amount> to a disconnected player and offline-uuid-fallback: true, instead of rejecting the operation, money is deducted from the sender immediately and the payment stays queued for delivery when the recipient connects.
Admin permissions:
-
vault.offlinepay.view— List the queue (/vault offlinepay list, defaultop) -
vault.offlinepay.refund— Refund a payment (/vault offlinepay refund <id>, defaultop)
OfflinePayQueueService maintains:
| Structure | Type | Key | Value |
|---|---|---|---|
queueById |
ConcurrentHashMap | id:Long |
QueuedPay |
byToUuid |
ConcurrentHashMap | to:UUID |
List<QueuedPay> |
idSeq |
AtomicLong | — | Auto-incremental ID |
Persistence in plugins/Vault/offline_pay_queue.yml:
pending:
7:
currency: default
from: 9b2b...
from_name: Notch
to: 550e...
to_name: Player123
amount: 250.0
created_at_ms: 1700000000000
note: "Last week's debt"-
PayCommanddetects offline recipient +offline-uuid-fallback: true -
SimpleEconomy.withdrawPlayer(...)withdraws immediately from the sender withTxType.OFFLINE_PAY_SENTand metadataqueue_id=<id> -
OfflinePayQueueService.queuePay()generatesQueuedPaywith sequential numeric ID - Message to sender:
Payment of $ 250 queued for Player123 (ID #7). Will be delivered when they log in.
On PlayerJoinEvent:
Bukkit.getScheduler().runTask(plugin, () -> deliverFor(p));deliverFor() iterates all pending payments for the UUID and for each one:
-
economy.depositPlayer(...)withTxType.OFFLINE_PAY_CLAIMEDand note "from " - Removes the record from
queueByIdandbyToUuid - At the end saves the YAML and sends:
You have N pending payment(s) delivered.
Returns all pending payments ordered by createdAtMs DESC (most recent first). Each entry shows ID, sender, recipient, currency, amount, date, and note if present.
Refunds the specific payment to the sender:
-
queueById.remove(id)and clears frombyToUuid -
economy.depositPlayer()→TxType.OFFLINE_PAY_REFUNDEDwith reasonrefund queue id=<id> - Persists the updated YAML
| Event | TxType |
|---|---|
| Payment queued (sender withdrawal) | OFFLINE_PAY_SENT |
| Recipient claims on login | OFFLINE_PAY_CLAIMED |
| Admin refunds | OFFLINE_PAY_REFUNDED |
Vault Economy v2.1.0 · Compatible with Spigot 1.8.8 – 1.21.x
📦 Modrinth ·
💬 Discord ·
Java 17 (legacy) · Java 21 (modern)
Documentation generated on 2026-09-03 · Vault Project Team
- 🏠 Home
- 🚀 First Install
- 🧑🏫 Getting Started
- ❓ Basic FAQ
- 📋 Complete Command List
- 🛡️ Complete Permission List
- ⚙️ config.yml Reference
- 🌐 Supported Languages
- 🆕 Modrinth Updates
- 💰 Player-to-Player Payments
- 🏦 Bank System
- 💵 Physical Notes
- 💸 Loans
- 📜 Transaction History
- 📊 Top Players
- ⏸️ Offline Payments
- 💳 Charges / Payment Requests
- 🔔 Discord Webhook
- 🛠️ Installation Errors
- 🚫 Players Can't Pay
- 🧨 Balances Wiped on Restart
- 📉 Bank Doesn't Pay Interest
- 🧾 Invalid / Expired Notes
- 🩺 Complete Step-by-Step Troubleshooting
- Java API
- 📜 Skript
- 🧰 Contribute · Dual Maven Build