Configuration

Quick look database & debug configuration

The configuration file for command aliases can be found at .minecraft/config/command-aliases-config.json. The autogenerated configuration file should appear as follows:

{
  "database_settings": {
    "database_mode": "LEVELDB",
    "host": "localhost",
    "port": 3306,
    "database": "command_aliases",
    "user": "default",
    "password": ""
  },
  "debug_settings": {
    "debug_mode": false,
    "show_processing_time": false,
    "broadcast_to_ops": false
  }
}

Database settings

You may be curious as to why a mod like Command Aliases would need or use a database at all. This feature was added to allow alias creators to create more complex commands by allowing them to store values, as there is not a proper way to do so using the vanilla system without causing significant performance penalties at a large scale.

Supported databases

Database modeDescriptionRequirements

IN_MEMORY

An implementation of a hashmap, data is losted upon closing the game/server.

None

LEVELDB

An implementation of LevelDB which is locally stored in the world folder.

None

MYSQL

An implementation of MySQL.

Host, Port, Database, User, Password

REDIS

An implementation of Redis

Host, Port, User, Password

Database configuration examples

  • In-Memory Database

{
  "database_settings": {
    "database_mode": "IN_MEMORY"
  }
}
  • LevelDB

{
  "database_settings": {
    "database_mode": "LEVELDB"
  }
}
  • MySQL

{
  "database_settings": {
    "database_mode": "MYSQL",
    "host": "localhost",
    "port": 3306,
    "database": "command_aliases",
    "user": "default",
    "password": ""
  }
}
  • Redis

{
  "database_settings": {
    "database_mode": "REDIS",
    "host": "localhost",
    "port": 6379,
    "user": "default",
    "password": ""
  }
}

Debug settings

This section is primarily used to debug the creation of more complex command aliases.

{
  "debug_settings": {
    "debug_mode": true, // Displays errors when creating new custom commands
    "show_processing_time": true, // Shows the amount of time it takes to process each command and execute them
    "broadcast_to_ops": true // Whether commands will be broadcasted to operators
  }
}

Last updated