---
description: >-
  JailsPlus supports multiple languages and provides extensive customization of
  all user-interface messages.
---

# Languages and Messages

**Note:** All translations in **Jails** are securely embedded within the plugin and cannot be customized. However, you can change the language to your preference by configuring it in the `config.yml` file.

## Language Files

JailsPlus comes with multiple language files located in the `plugins/JailsPlus/lang/` directory:

* `en.yml` - English
* `es.yml` - Spanish
* `fr.yml` - French
* `de.yml` - German
* `pt.yml` - Portuguese
* `ru.yml` - Russian
* `pl.yml` - Polish

Each file contains the same message keys but with translations for their respective languages.

## Setting the Language

To change the plugin's language:

1. Open `config.yml` in your JailsPlus directory
2.  Find the `language` setting near the top:

    ```yaml
    language: "en" # (en/es/ru/fr/de/pt/pl)
    ```
3. Change the value to your preferred language code
4. Save the file and use `/jails reload` to apply changes

## Message Categories

#### General Messages

```yaml
  unknown_command: "&cPlease use a valid command! (e.g /jails help)"
  no_permission: "{prefix} &cYou do not have permission to use this command!"
  invalid_jail: "{prefix} &cJail &e{jails} &cnot found!"
  invalid_flag: "{prefix} &cFlag &e{flag} &cnot found!"
  invalid_player: "{prefix} &cPlayer &e{player} &cnot found!"
  invalid_world: "{prefix} &cWorld &e{world} &cnot found!"
  only_players: "{prefix} &cOnly players can use this command!"
  already_jailed: "{prefix} &ePlayer {player} is already jailed!"
  not_jailed: "{prefix} &ePlayer {player} is not jailed!"
  teleported: "{prefix} &aTeleported to the jails: &e{jails}"
  teleported_flag: "{prefix} &aTeleported to the flag: &e{flag}"
```

#### Jail Operations

```yaml
jail_broadcast_message: "{prefix} &6{player} has been jailed for {duration}. Reason: {reason}!"
jail_success_target: "{prefix} &aYou have been jailed permanently by {jailer}. Reason: {reason}!"
unjail_success: "{prefix} &aPlayer &e{player} &ahas been unjailed."
tempjail_success_jailer: "{prefix} &a{player} has been jailed temporarily for {duration}."
```

#### Interactions while jailed

```yaml
  chat_disabled: "{prefix} &cYou cannot chat while jailed!"
  command_blocked: "{prefix} &cYou cannot use this command while jailed!"
  jail_block_break: "{prefix} &cYou cannot break blocks while jailed!"
  jail_block_place: "{prefix} &cYou cannot place blocks while jailed!"
  jail_use_items: "{prefix} &cYou cannot use items while jailed!"
  jail_use_ender_pearls: "{prefix} &cYou cannot use ender pearls while jailed!"
  jail_attack: "{prefix} &cYou cannot attack others while jailed!"
  jail_vehicles: "{prefix} &cYou cannot enter vehicles while jailed!"
  jailed_join: "{prefix} &cYou have been jailed permanently by {jailer}. Reason: {reason}"
  unjailed_join: "{prefix} &aYour jail time has ended. You are now free!"
  tempjailed_join: "{prefix} &cYou are temporarily jailed for {duration}!"
  ipjailed_join: "{prefix} &cYou've been automatically jailed due to a jailed IP address."
```

#### Handcuff System

```yaml
  chat_disabled: "{prefix} &cYou cannot chat while jailed!"
  command_blocked: "{prefix} &cYou cannot use this command while jailed!"
  jail_block_break: "{prefix} &cYou cannot break blocks while jailed!"
  jail_block_place: "{prefix} &cYou cannot place blocks while jailed!"
  jail_use_items: "{prefix} &cYou cannot use items while jailed!"
  jail_use_ender_pearls: "{prefix} &cYou cannot use ender pearls while jailed!"
  jail_attack: "{prefix} &cYou cannot attack others while jailed!"
  jail_vehicles: "{prefix} &cYou cannot enter vehicles while jailed!"
  jailed_join: "{prefix} &cYou have been jailed permanently by {jailer}. Reason: {reason}"
  unjailed_join: "{prefix} &aYour jail time has ended. You are now free!"
  tempjailed_join: "{prefix} &cYou are temporarily jailed for {duration}!"
  ipjailed_join: "{prefix} &cYou've been automatically jailed due to a jailed IP address."
```

#### Flag and Selection System

```yaml
selection_tool_received: "{prefix} &aYou have been given the Flag Selection Tool (&e{material}&a). Use the '/jails set flag' command after selecting the two corners."
selection_first_corner: "{prefix} &aFirst corner set at: &e{location}"
selection_second_corner: "{prefix} &aSecond corner set at: &e{location}"
previewing: "{prefix} &ePreviewing the flag &a{flag} &efor 15 seconds..."
```

#### Bail System

```yaml
  bail_set_success: "&aSet bail for &e{player} &ato &e${amount}"
  bail_success_message: "§aSuccessfully paid bail for §e{player}§a! Amount: §e${amount}"
  bail_released_message: "§aYou have been released from jails! Bail paid by §e{bailer}§a."
  bail_gui_title: "§6§lBail System - Select Player"
  bail_error: "§cAn error occurred while processing the bail."
  bail_system_title: "§6§lBail System"
  bail_system_info_1: "§7Click on a player's head to"
  bail_system_info_2: "§7pay their bail and release them"
  total_players_label: "§8» §7Total Players: §e"
  bailable_player_name: "§c§l{player}"
  jailed_player_status: "§7This player is currently jailed"
  jailed_player_bail_available: "§7and has bail available"
```

**Note: Not all translation messages are listed here!**

## Color Codes

`&0` - Black&#x20;

`&1` - Dark Blue&#x20;

`&2` - Dark Green&#x20;

`&3` - Dark Aqua&#x20;

`&4` - Dark Red&#x20;

`&5` - Dark Purple&#x20;

`&6` - Gold&#x20;

`&7` - Gray&#x20;

`&8` - Dark Gray&#x20;

`&9` - Blue&#x20;

`&a` - Green&#x20;

`&b` - Aqua&#x20;

`&c` - Red&#x20;

`&d` - Light Purple&#x20;

`&e` - Yellow&#x20;

`&f` - White

**Formatting codes:**

`&k` - Obfuscated&#x20;

`&l` - **Bold**&#x20;

`&m` - ~~Strikethrough~~&#x20;

`&n` - Underline&#x20;

`&o` - _Italic_&#x20;

`&r` - Reset

Example from en.yml:

```yaml
config_reload_success: "{prefix} &aSuccessfully reloaded the Jails+ configuration!"
```

## Placeholders

JailsPlus uses curly braces `{}` for placeholders. Common placeholders:

* `{prefix}` - The plugin prefix defined in config.yml
* `{player}` - Player's name
* `{jails}` - Jail name
* `{flag}` - Flag name
* `{reason}` - Reason for jailing
* `{duration}` - Jail duration
* `{jailer}` - Name of the staff member who jailed the player
* `{location}` - Formatted location string
* `{time}` - Remaining jail time
* `{amount}` - Bail amount

## Customizing Messages

To customize messages:

1. Open the appropriate language file (e.g., `en.yml`)
2. Locate the message you want to change
3. Edit the message text, keeping placeholders intact
4. Save the file
5. Use `/jails reload` to apply changes

**Example:**

Original:

```yaml
jail_broadcast_message: "{prefix} &6{player} has been jailed for {duration}. Reason: {reason}!"
```

Customized:

```yaml
jail_broadcast_message: "{prefix} &c{player} &6was thrown in jail for &e{duration}&6. Reason: &f{reason}"
```

## Troubleshooting

#### Missing Messages

If a message appears in English despite using another language:

* Verify that you're using the correct language code in `config.yml`
* Ensure that you have executed the command `/jails reload`

#### Placeholder Issues

If placeholders aren't working:

* Ensure you haven't removed or changed placeholders in message strings
* Check that placeholders use the correct format: `{placeholder}`
* Verify that you're using the correct placeholder names

#### Color Code Problems

If color codes aren't working:

* Check that you're using the ampersand format (`&`) and not section symbol (`§`)
* Verify that color codes are correctly formatted without spaces

#### After Changes

* Always use `/jails reload` after editing language files
* Some changes may require a server restart

### Default Values

If you need to reset a language file to its defaults:

1. Delete the language file
2. Restart your server
3. The plugin will generate a new file with default values

The language system is designed to be flexible and extensible, allowing you to create the perfect user experience for your server's community.
