Clickable Charge Requests
Unlike direct payment (sender sends money), the charge request (payment request) sends the target a clickable message so that they make the payment. Useful for shops, events, or for a newcomer to request money without touching the/pay command.
Initiated from:
- Player sub-menu → Charge (Redstone) → chat flow to enter amount
- Or via internal API
ChargeRequestService.startRequest(sender, target)
Online Charge Flow
If the recipient is connected, they receive a SpigotTextComponent with:
ClickEvent.Action.RUN_COMMAND→/pay <requester> <amount>HoverEvent.Action.SHOW_TEXT→ details
pay.request.sent confirmation; if the recipient clicks and has enough money, the TxRecord is written as CHARGE_PAID.
Offline Charge Persistence
If the recipient is disconnected, the request is NOT lost. The chosen storage depends onstorage.use_mysql:
Delivery on Login: max_on_join
PlayerJoinEvent → ChargeRequestService.onJoin() delivers pending charges but never more than pay_pending.max_on_join per session:
- Memory mode: first N are removed; the rest are re-inserted into
pendingByRecipient - MySQL mode: only those delivered by
fetchAndDeletePendingRequests(recipient, limit)are deleted from the table; others wait for the next login
Cancellation and Chat Input
During amount input via chat (before sending the request):- Typing
cancelorcancelaraborts (configurable:pay.prompt.cancel_words) pay_limits.min / maxlimits apply — bypass withvault.pay.bypass_*
/pay cancel (and alias cancelar) directly cancels the active session.