Skip to content

Configuration

Ali Arslan edited this page Apr 11, 2026 · 4 revisions

Configuration Overview

UxmDiscordSync uses multiple configuration files, each responsible for a specific system. All files live under plugins/UxmDiscordSync/.


config.yml — Main Configuration

This is the primary file. It controls the Discord bot connection, database, core features, and the linking system.

discord Section

discord:
  token: "YOUR_BOT_TOKEN_HERE"       # Bot token from Discord Developer Portal
  guild-id: "YOUR_GUILD_ID_HERE"     # Your Discord server (guild) ID

  presence:
    enabled: true
    update-interval: 60              # Seconds between status message rotations
    messages:
      - "Playing on %server_name%"
      - "%online_players% players online"

  linking:
    channel-id: "CHANNEL_ID"         # Channel where the link embed is posted
    linked-role-ids:                 # Roles given to all linked players
      - "ROLE_ID_1"
    code-expiration: 300             # Seconds before the linking code expires
    embed:                           # Customise the link embed appearance
      title: "Link Your Account"
      description: "..."
      color: "#5865F2"
    button:
      label: "Link Account"
      emoji: "🔗"
    modal:
      title: "Enter Verification Code"
      input-label: "6-Digit Code"

database Section

See Database Setup for the full breakdown.

Feature Toggle Sections

Each feature has an enabled flag:

chat-bridge:
  enabled: true

server-stats:
  enabled: true

discord-broadcast:
  enabled: true
  authorized-users:
    - "DISCORD_USER_ID"

discord-server-command:
  enabled: true
  authorized-users:
    - "DISCORD_USER_ID"

level-system:
  enabled: true

two-factor:
  enabled: false

punishment-sync:
  enabled: false

commands.yml — Command Configuration

Controls aliases and permission nodes for every Minecraft command.

link:
  aliases:
    - link
    - discordlink
  permission: "uxmdiscordsync.link"

unlink:
  aliases:
    - unlink
  permission: "uxmdiscordsync.unlink"

linkstatus:
  aliases:
    - linkstatus
    - discordstatus
  permission: "uxmdiscordsync.linkstatus"

boostprize:
  aliases:
    - boostprize
    - boostreward
  permission: "uxmdiscordsync.boostprize"

discordreward:
  aliases:
    - discordreward
  permission: "uxmdiscordsync.discordreward"

admin:
  aliases:
    - uxmdiscordsync
    - uxmds
  permission: "uxmdiscordsync.admin"

advanced.yml — Performance & Security

cache:
  enabled: true
  ttl: 600          # Seconds to cache linked account data
  max-size: 1000    # Maximum cache entries

async:
  pool-size: 4      # Thread pool size for async operations

security:
  rate-limit:
    code-generation: 3    # Max code requests per minute per player
    webhook-delay: 1000   # Milliseconds between webhook calls

debug: false        # Enable verbose logging

rank-sync.yml — Rank Synchronization

See Rank Synchronization for full details.

rank-sync:
  enabled: true
  sync-on-join: true
  sync-on-link: true
  auto-sync:
    enabled: true
    interval: 300         # Seconds between automatic syncs

  remove-old-roles: true  # Remove unmapped roles before adding new ones

  nickname:
    enabled: true
    format: "%player_name%"

  mappings:
    - group: "admin"
      role-id: "DISCORD_ROLE_ID"
      priority: 100
      post-link-commands:
        - "say %player_name% has the admin rank"
    - group: "member"
      role-id: "DISCORD_ROLE_ID"
      priority: 1

boost-rewards.yml — Boost Rewards

See Boost Rewards for full details.

boost-rewards:
  enabled: true
  cooldown: 86400           # Seconds between claims (86400 = 24 hours)
  cooldown-mode: global     # "global" or "per-server"
  commands:
    - "give %player_name% diamond 5"
    - "eco give %player_name% 1000"
  notify-discord: true
  notify-channel-id: "CHANNEL_ID"

level-system.yml — Level System

See Level System for full details.

level-system:
  text:
    enabled: true
    xp-per-message: 5
    cooldown: 60           # Seconds between XP awards per user
    channels:
      - "CHANNEL_ID"       # Leave empty to allow all channels
  voice:
    enabled: true
    xp-per-interval: 10
    interval: 300          # Seconds between voice XP awards

  levels:
    - level: 5
      required-xp: 500
      commands:
        - "give %player_name% emerald 1"
    - level: 10
      required-xp: 1500
      commands:
        - "give %player_name% emerald 5"

two-factor.yml — Two-Factor Authentication

See Two-Factor Authentication for full details.

two-factor:
  enabled: false
  timeout: 120              # Seconds player has to approve
  ip-whitelist:
    enabled: false
    ips: []
  geoip:
    enabled: false
    database-path: "GeoLite2-City.mmdb"
  on-deny:
    action: kick            # "kick" or "ban"
    message: "2FA denied."
  freeze-player: true
  embed:
    title: "Login Verification"
    color: "#FF9900"

punishment-sync.yml — Punishment Sync

See Punishment Sync for full details.


logging.yml — Webhook Logging

See Logging for full details.

audit-log:
  enabled: true
  webhook-url: "https://discord.com/api/webhooks/..."

chat-log:
  enabled: false
  webhook-url: "https://discord.com/api/webhooks/..."
  max-messages-per-minute: 30
  ignore-prefixes:
    - "/"
    - "!"

join-leave-log:
  minecraft:
    enabled: true
    webhook-url: "https://discord.com/api/webhooks/..."
  discord:
    enabled: true
    webhook-url: "https://discord.com/api/webhooks/..."

discord-custom-commands.yml

Master switch for the custom Discord commands system.

custom-commands:
  enabled: true

Individual custom commands live in the discord-commands/ folder. See Custom Commands.


Reload vs Restart

Change Reload (/uxmdiscordsync reload) Restart Required
Message text Yes No
Feature enable/disable Yes No
Rank mappings Yes No
Bot token No Yes
Database type No Yes
Java pool size No Yes

Clone this wiki locally