.mdcommands folder. This feature is perfect for automating complex or frequently-used server commands.
What Are Predefined Commands?
Predefined commands are:- YAML-based: Stored as
.ymlfiles - Process-specific: Each server/network has its own
.mdcommandsfolder - Multi-action: One command can execute multiple server console commands
- Discord-accessible: Execute via the File Manager interface
Command File Location
Each process has a dedicated.mdcommands folder:
Command File Format
Predefined commands are defined in YAML format:mobswitch.yml
- Top-level keys: Action names (e.g.,
Reset,Over,Enable) - Values: List of commands to execute in sequence
Each command in the list is executed in order on the server console.
Creating Predefined Commands
Using Predefined Commands
Via File Manager Interface
Command Interface Controls
β¬ οΈ Back
Return to the .mdcommands folder view
π Reload
Refresh the command interface
Execute
Run the selected actionβs command sequence
Edit
Open the YAML file for editing
Delete
Remove the command file
Dropdown
Select which action to execute
Example: MobSwitch Commands
A practical example for managing mob spawning on a Minecraft server:mobswitch.yml
- Navigate to
.mdcommands/mobswitch - Select action (e.g., βResetβ)
- Click Execute
- All commands run sequentially on the server
Example: World Border Commands
Manage world borders across dimensions:worldborder.yml
Example: Maintenance Commands
Routine maintenance tasks:maintenance.yml
Example: Permission Commands
Manage player permissions:permissions.yml
Replace
{username} with actual player names when executing. Some servers support placeholder syntax.Example: Event Commands
Special event configurations:events.yml
Editing Commands
You can edit existing commands via the File Manager:Deleting Commands
To remove a predefined command:- Navigate to
.mdcommands/<command_name> - Click the Delete button
- Confirm deletion
Command Execution Flow
When you execute a predefined command action:Use Cases
Server Maintenance
Backup sequences, restart warnings, lag clearing
World Management
World borders, time/weather control, spawn settings
Player Management
Permission changes, teleports, inventory management
Event Automation
PVP events, build competitions, mini-games
Technical Tasks
Redstone automation, farm controls, mob switches
Administration
Moderation tools, server configuration, rule enforcement
Best Practices
1. Use Descriptive Names
2. Add Feedback Messages
3. Group Related Actions
maintenance.yml
4. Test Commands First
Before creating predefined commands:- Test each command manually in the console
- Verify the syntax is correct
- Confirm the expected behavior
- Then add to
.mdcommands
5. Document Complex Commands
Troubleshooting
Command file not appearing
Command file not appearing
Problem: Created a
.yml file but it doesnβt show in the interfaceSolutions:- Ensure the file is in the correct
.mdcommandsfolder - Verify the file has a
.ymlextension - Click π to reload the interface
- Check for YAML syntax errors
Commands not executing
Commands not executing
Problem: Clicking Execute doesnβt run the commandsSolutions:
- Verify the server process is running
- Check console thread for error messages
- Ensure command syntax is correct for your server version
- Test commands manually in console first
Invalid YAML error
Invalid YAML error
Problem: File editor shows YAML syntax errorCommon issues:
- Incorrect indentation (use spaces, not tabs)
- Missing colons after action names
- Missing hyphens before list items
Partial command execution
Partial command execution
Problem: Only some commands in the sequence executePossible causes:
- Server lag between commands
- Command errors stop the sequence
- Permission issues
- Check console for error messages
- Verify server has necessary permissions
- Add delays if needed (not built-in, may require plugins)
Advanced Tips
Combining with Plugins
Predefined commands can work alongside plugins:- Use commands to trigger server-side events
- Plugins detect those events via
listener_events - Plugins perform additional automation
Creating Command Libraries
Organize commands by category:Version Control
Keep backups of your command files:- Download
.ymlfiles via File Manager - Store in version control (Git)
- Restore if accidentally deleted
Real-World Example: Aeternum SMP
On servers like Aeternum SMP, predefined commands automate complex tasks:- MobSwitch: Toggle mob spawning for technical work
- Backup Sequences: Coordinated save commands
- Event Triggers: Start/stop PVP events, competitions
Next Steps
File Manager
Learn more about managing files in McDis-RCON
Creating Plugins
Extend functionality beyond predefined commands

