Skip to content

Configuration — config.yml ​

The config.yml file is generated automatically at plugins/NXMines/config.yml the first time the server starts with the plugin. To apply changes use /mine reload or restart the server.


Full file with comments ​

yaml
# ============================================================
#  NXMines — Main Configuration
# ============================================================

# Language of the messages. Options: "es" (Español), "en" (English)
# Loads the file: plugins/NXMines/lang/messages-<messages>.yml
messages: "es"

# -----------------------------------------------------------------
# Database
# -----------------------------------------------------------------
database:
  # SQLITE | MYSQL | MARIADB
  type: SQLITE

  sqlite:
    file: "nxmines.db"

  mysql:
    host: localhost
    port: 3306
    database: nxmines
    username: root
    password: ""
    useSSL: false
    pool:
      maximum-pool-size: 10
      minimum-idle: 2
      connection-timeout: 5000
      idle-timeout: 600000
      max-lifetime: 1800000

# -----------------------------------------------------------------
# Performance
# -----------------------------------------------------------------
performance:
  # Blocks placed per tick during a batched reset.
  # Higher = faster reset, bigger impact on TPS.
  blocks-per-tick: 5000

  # Mines with a volume <= this value use InstantResetStrategy
  # (all blocks in a single tick, no batching overhead).
  instant-reset-threshold: 1000

  # Maximum number of mines loaded in memory at the same time.
  # 0 = no limit (loads all mines).
  max-loaded-mines: 0

# -----------------------------------------------------------------
# Mines
# -----------------------------------------------------------------
mines:
  # Allow mine regions to overlap each other.
  allow-region-overlap: false

  # Warn and ask for confirmation if the volume changes by more than
  # this fraction when redefining (0.5 = 50%).
  redefine-size-change-warning-threshold: 0.5

  # Default reset interval in seconds for new mines.
  default-reset-interval: 300

  # Whether messages should be broadcast when a mine resets.
  broadcast-reset-messages: true

  # Recipients of reset messages:
  #   GLOBAL  — all online players
  #   RADIUS  — players within broadcast-radius blocks
  #   MINE    — only players inside the mine's region
  #   NONE    — disable reset messages completely
  broadcast-mode: GLOBAL
  broadcast-radius: 100

  # Force a reset if the mine falls below this % of blocks.
  # 0 = disabled.
  auto-reset-percentage: 0

# -----------------------------------------------------------------
# Drops
# -----------------------------------------------------------------
drops:
  # How drops are delivered:
  #   INVENTORY — go straight to the player's inventory
  #   GROUND    — drop on the ground at the player's position
  mode: INVENTORY

  # If an auto-pickup plugin is active, INVENTORY is always used.
  force-inventory-with-autopickup: true

# -----------------------------------------------------------------
# Text formatting
# -----------------------------------------------------------------
text:
  # Date/time format for placeholders such as %mine_next_reset%.
  # Uses Java DateTimeFormatter patterns.
  datetime-format: "HH:mm:ss"

  # Format of the remaining time.
  # Tokens: {h} hours, {m} minutes, {s} seconds
  time-format: "{h}h {m}m {s}s"

Section reference ​

messages ​

KeyTypeDescription
messagesString ("es" / "en")Language of the messages. Loads the file lang/messages-<value>.yml.

database ​

KeyTypeDescription
typeStringDatabase engine: SQLITE, MYSQL or MARIADB.
sqlite.fileStringName of the SQLite file inside plugins/NXMines/.
mysql.hostStringMySQL server host.
mysql.portIntegerMySQL server port.
mysql.databaseStringMySQL database name.
mysql.usernameStringDatabase user.
mysql.passwordStringDatabase password.
mysql.pool.*VariousHikariCP connection pool parameters.

Changing the database type requires restarting the server. Data is not migrated automatically between SQLite and MySQL.


performance ​

KeyTypeDescription
blocks-per-tickIntegerBlocks placed per tick in BatchResetStrategy. Default value: 5000.
instant-reset-thresholdIntegerMaximum volume (in blocks) to use InstantResetStrategy. Default value: 1000.
max-loaded-minesIntegerLimit of mines in memory. 0 = no limit.

mines ​

KeyTypeDescription
allow-region-overlapBooleanIf true, mine regions can overlap.
redefine-size-change-warning-thresholdDouble (0–1)Volume change threshold that requires confirmation when redefining.
default-reset-intervalIntegerReset interval in seconds for new mines.
broadcast-reset-messagesBooleanIf true, messages are broadcast when a mine resets.
broadcast-modeStringGLOBAL, RADIUS, MINE or NONE.
broadcast-radiusIntegerRadius in blocks (only for broadcast-mode: RADIUS).
auto-reset-percentageInteger (0–100)Forces a reset if blocks fall below this %. 0 = disabled.

drops ​

KeyTypeDescription
modeStringINVENTORY (straight to inventory) or GROUND (on the ground).
force-inventory-with-autopickupBooleanIf there is auto-pickup, always uses INVENTORY.

text ​

KeyTypeDescription
datetime-formatStringJava DateTimeFormatter pattern for dates.
time-formatStringFormat of the remaining time. Tokens: {h}, {m}, {s}.

Desarrollado con ❤️ por Naxito's Studios