Priority: MEDIUM
Status: TODO
Required for: #41 (Rest Commands), #47 (Character Sheet Commands)
Description
Create a system to designate who the current DM(s) are, separate from OP permissions. This allows flexible DM assignment for guest DMs, rotating DMs, or restricting DM commands without giving full OP access.
Use Cases
- Guest DMs running one-shots on your server
- Rotating DMs in West Marches campaigns
- Multiple DMs for large groups
- Restricting DM commands without giving full server OP access
- Player becomes temporary DM for a session
Commands
/dm add <player> - Grant DM role to a player
/dm remove <player> - Revoke DM role from a player
/dm list - Show current DMs (with online status)
Command Examples
/dm add charlie
→ "Charlie is now a DM"
/dm remove charlie
→ "Charlie is no longer a DM"
/dm list
→ "Current DMs:
• Astra (Online)
• Diana (Offline)
• [OP] ServerAdmin (Online)"
Acceptance Criteria
Storage (dms.yml)
dms:
- uuid-1 # Astra
- uuid-2 # Diana
Permission Logic
isDM(player) returns true if:
- Player has OP permissions, OR
- Player's UUID is in the DM list
This way OPs always have DM access, but you can also grant DM role to non-OPs.
Commands to Update
All commands that should be DM-only need to check isDM():
Technical Notes
- Create
DMManager class similar to CharacterSheetManager
- Create
DMPersistenceLoader for loading/saving
- Add
isDM(Player player) static method for permission checks
- Load DM list on plugin enable
- Save DM list on changes
Related Issues
Future Enhancements
/dm session start - Mark session as active (affects auto-save, etc.)
/dm session end - End session, trigger auto-save
- DM-specific chat channel
- DM notes system
Priority: MEDIUM
Status: TODO
Required for: #41 (Rest Commands), #47 (Character Sheet Commands)
Description
Create a system to designate who the current DM(s) are, separate from OP permissions. This allows flexible DM assignment for guest DMs, rotating DMs, or restricting DM commands without giving full OP access.
Use Cases
Commands
/dm add <player>- Grant DM role to a player/dm remove <player>- Revoke DM role from a player/dm list- Show current DMs (with online status)Command Examples
Acceptance Criteria
/dm add <player>command (OP only)/dm remove <player>command (OP only)/dm listcommand (anyone can see who DMs are)dms.ymlisDM(player)helper methodisDM()checkStorage (dms.yml)
Permission Logic
isDM(player)returns true if:This way OPs always have DM access, but you can also grant DM role to non-OPs.
Commands to Update
All commands that should be DM-only need to check
isDM():/restcommands (Issue Add /shortrest and /longrest commands #41)/viewsheet//sheetcommands (Issue Character Sheet Commands (View and Give) #47)/partycommands (Issue Party Targeting System #42)/restoreresource//consumeresource(Issue Add /shortrest and /longrest commands #41)/progresstime(Issue Time Progression Commands #44)/npccommands,/dmcommands themselvesTechnical Notes
DMManagerclass similar toCharacterSheetManagerDMPersistenceLoaderfor loading/savingisDM(Player player)static method for permission checksRelated Issues
Future Enhancements
/dm session start- Mark session as active (affects auto-save, etc.)/dm session end- End session, trigger auto-save