Skip to main content

Initial Configuration

Usage behind proxy​

Before proceeding, if you are using a proxy (e.g., BungeeCord or Velocity), you must enable behind-proxy on Triton's config.yml for every Spigot/Paper server.

behind-proxy: true

Storage type​

Triton currently supports local (JSON) storage and MySQL storage.

If you want to use local storage, you don't need the make any changes, it's good to go out of the box.

However, if you want to use non-local storage (MySQL), you have to change the storage type and fill in the information accordingly.

config.yml
# This section controls the storage location of player data and translations.
# If using a database, the tables/collections will be created automatically for you.
# You can use '/triton database upload' to upload the local translations to a remote storage.
# If you are using a proxy (e.g., BungeeCord or Velocity), this MUST match Triton's configuration there.
storage:
# Valid options: 'local', 'mysql'
type: 'local'
# This should match the name of this server your proxy's configuration (e.g., BungeeCord's config.yml or Velocity's velocity.toml).
# Used to filter translations for this server only
server-name: 'lobby'
# The options below this are for non-local storage only
host: "localhost"
port: 3306
database: "triton"
username: "root"
password: ""
table-prefix: "triton_"
tip

The server-name variable is only loaded when using non-local storage types and it's used to filter translations that have entries in the server field.
If you're using a server template system, it might not be possible to set this. Leaving this empty will work correctly as long as you don't want to filter translations by server.

warning

If you're using a proxy, you must use the same storage configuration on all servers, including on the proxy itself. If you fail to do that, translations might not be loaded correctly.

danger

If you're using MySQL storage with a proxy, you MUST have the same configuration for languages on Triton's config on all servers and on the proxy. If you don't do this, translations will not be synced correctly between servers.

Languages​

Adding languages to the plugin is pretty straightforward. All you have to do is add/modify a section within the languages sections on config.yml.

To get a flag code, follow the guide on generating flag codes.

Details about every variable below can be found in the config page.

config.yml
# This will be ignored if `behind-proxy` is enabled and local storage is being used.
# If using non-local storage, please make sure this matches what's on Triton's configuration on your proxy.
languages:
# The language name. This will influence the language key in the translation files.
# It's recommended to follow this syntax: xx_XX
# It's also not recommended changing this after someone has joined your server,
# as their language will reset to default.
en_GB:
# This is the encoded flag code to show up the banner.
# To get a working code, you should visit https://triton.rexcantor64.com/banner and create your banner.
# When you finish, you should notice that the share link as changed.
# Just copy the code generated by it, which appears after the ?=
# i.e. If the link is https://<link>?=eapwplpnpmbzbj then the code will be eapwplpnpmbzbj
flag: eapwplpnpmbzbj
# The Minecraft code is the Minecraft language code. You can find a complete list here:
# https://minecraft.gamepedia.com/Language
minecraft-code: [ en_GB, en_AU, en_CA, en_NZ, en_PT, en_UD, en_US ]
# The display name. This will be the language name in non-code version. For example, en_UK should be English (UK)
# Feel free to use colours here!
display-name: '<dark_aqua>English (UK)'
# The languages to check for translations when this language does not have them.
# The main language is also always checked last, even if you leave this empty.
fallback-languages:
- pt_PT
# Use this to run commands on language change.
# The commands must not start with a slash.
# Prefix with the desired type. Available types: 'PLAYER', 'SERVER'
# i. e. "PLAYER:say I'm using English now!"
# Please uncomment the lines below to start using this feature.
# Available variables:
# %player% - Replaced with the player's name.
# %uuid% - Replaced with the player's UUID (with dashes).
# commands:
# - 'SERVER:say %player% (%uuid%) has just changed their language!'
pt_PT:
flag: bacLlt
minecraft-code: [ pt_PT, pt_BR ]
display-name: '<dark_aqua>Portuguese (Portugal)'
fallback-languages: []
# commands:
# - 'SERVER:say %player% (%uuid%) has just changed their language!'
tip

If you're using a proxy with local storage, you only need to configure the languages on the proxy server.

Translations​

The best way to add and edit translations easily is using TWIN. To use it, you must first get a TWIN token.

To get the token, you can either join our Discord server or DM me (Rexcantor64) on Spigot.

# To access TWIN, you need a special token.
twin-token: ''
tip

If you're using a proxy, you don't need to put the token in any Spigot/Paper server, only on the proxy.

After getting access to TWIN, follow the translating your first message guide.