Skip to Content
1robie
Configuration

Messages & translations

Change or translate the text players see.

Each player sees MachineEngine in their own Minecraft language. The text is in two places:

WhatWhere
Chat and action bar messages, admin command outputplugins/MachineEngine/lang/<language>.yml
Item lore, the player settings menuplugins/CraftEngine/resources/machineengine/configuration/lang.yml

Chat and action bar messages

One file per language, in plugins/MachineEngine/lang/:

  • en_us.yml is written from MachineEngine's built-in English, and gets new messages when you update.
  • fr_fr.yml ships with MachineEngine.
  • Add a language by copying en_us.yml to lang/<language code>.yml (de_de.yml, es_es.yml …) and translating it. Then run /machineengine reload config.
plugins/MachineEngine/lang/fr_fr.yml
machineengine:
  machine:
    chunk_limit:
      '<red>Ce chunk contient déjà %count% machines (limite %limit%).'
  wrench:
    busy:
      type: ACTION_BAR
      message: '<red>La machine est occupée ; réessayez'
  • Colors: MiniMessage tags. Write \< for a literal <.
  • Values: %count%, %limit% … are filled in by MachineEngine. A value is shown as it is: a player name can't bring its own colors or click actions.
  • Where it shows: a message is a chat message unless its entry says otherwise. type: ACTION_BAR, TITLE, BOSS_BAR, SOUND or a list of them send it elsewhere.

Which language a player gets

  1. The file of their client's language (fr_ca.yml for a Québec client);
  2. else another country of the same language (fr_fr.yml);
  3. else messages.default-language in config.yml (en_us by default).

A message missing from a language's file falls back to the default language. The console reads the default language.

messages.prefix in config.yml is put before every chat message, e.g. "<dark_gray>[<gold>Machines</gold>]</dark_gray> ". See the configuration reference.

Item lore and the settings menu

Item stacks and menus are shared by everyone who sees them, so their text is translated on each player's client instead, as a CraftEngine translation:

plugins/CraftEngine/resources/machineengine/configuration/lang.yml
lang:
  en_us:
    machineengine.lore.energy: '<gray>Energy: %s / %s %s'
  fr_fr:
    machineengine.lore.energy: '<gray>Énergie : %s / %s %s'
  • Arguments: %s, in order; %1$s, %2$s to reorder them.
  • After editing, run /ce reload all so CraftEngine rebuilds the resource pack.
  • Players without the resource pack see the English text built into MachineEngine.

Updates never overwrite either file. New messages are added to en_us.yml on their own. For lang.yml, delete it and restart to get the new keys back (copy your edits first).

Machine menu titles and button names are in the zMenu files in plugins/MachineEngine/menus/. See Machine menus. Addons ship their own translations (Mekanized's are in plugins/CraftEngine/resources/mekanized/).

Last updated on

On this page