Skip to content

DM Role Management System #46

Description

@FirebrickRed

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

  • /dm add <player> command (OP only)
  • /dm remove <player> command (OP only)
  • /dm list command (anyone can see who DMs are)
  • Persistent storage in dms.yml
  • Create isDM(player) helper method
  • Update all DM-only commands to use isDM() check
  • Tab completion for player names

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions