Priority: LOW
Status: TODO
Depends on: #41 (Rest Commands)
Description
Allow players to request rests that DMs can approve/deny, preventing abuse while maintaining player agency.
Use Case
This is an alternative/supplement to the permission-based DM-only approach in Issue #41. Allows players to participate in the rest workflow without giving them unrestricted access.
Player Commands
/requestrest <short|long> - Send rest request to DM
DM Commands
/approverest <player> [short|long] - Approve pending request
/denyrest <player> - Deny request
/rest pending - View all pending rest requests
Workflow
Charlie: /requestrest short
→ Charlie sees: "Rest request sent to DM"
→ DM sees: "[CLICK TO APPROVE] Charlie wants to take a short rest"
DM clicks OR types: /approverest charlie
→ Charlie receives short rest benefits
→ Charlie sees: "Short rest granted by DM"
OR
DM: /denyrest charlie
→ Charlie sees: "Rest request denied"
Acceptance Criteria
Features
- Clickable approval messages for DMs (JSON text components)
- Queue multiple requests (players can have 1 pending at a time)
- Timeout after 5 minutes (configurable)
- Notify all online DMs/OPs
- Auto-deny if player disconnects
Feedback Messages
Player request:
→ To player: "Short rest request sent to DM. Waiting for approval..."
→ To DMs: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[REST REQUEST]
Charlie wants to take a SHORT REST
[✓ APPROVE] [✗ DENY]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
DM approval:
→ To player: "Short rest approved! [Resources restored...]"
→ To DM: "Approved short rest for Charlie"
DM denial:
→ To player: "Rest request denied by DM"
→ To DM: "Denied rest request for Charlie"
Timeout:
→ To player: "Rest request timed out. Please ask your DM."
Config (config.yml)
rest_requests:
enabled: true
timeout_minutes: 5
notify_all_dms: true
allow_multiple_pending: false
clickable_approve: true
Technical Notes
- Store pending requests in memory:
Map<UUID, PendingRestRequest>
- PendingRestRequest:
{ playerId, restType, timestamp }
- Use scheduler to check for timeouts every minute
- Clickable text uses JSON text components with
/approverest command
- Clear request on approve, deny, timeout, or player disconnect
Optional Features (Future)
/requestrest while in combat → auto-denied with message
- Track request history for metrics
- Configurable auto-approval during non-combat
- Integration with party system (request for whole party)
Related
Priority: LOW
Status: TODO
Depends on: #41 (Rest Commands)
Description
Allow players to request rests that DMs can approve/deny, preventing abuse while maintaining player agency.
Use Case
This is an alternative/supplement to the permission-based DM-only approach in Issue #41. Allows players to participate in the rest workflow without giving them unrestricted access.
Player Commands
/requestrest <short|long>- Send rest request to DMDM Commands
/approverest <player> [short|long]- Approve pending request/denyrest <player>- Deny request/rest pending- View all pending rest requestsWorkflow
Acceptance Criteria
/rest pendingFeatures
Feedback Messages
Config (config.yml)
Technical Notes
Map<UUID, PendingRestRequest>{ playerId, restType, timestamp }/approverestcommandOptional Features (Future)
/requestrestwhile in combat → auto-denied with messageRelated