mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-23 02:25:26 +01:00
Add support for colors in messages.yml
This commit is contained in:
parent
44c72490a5
commit
908b7c956b
@ -2,6 +2,7 @@ package org.appledash.saneeconomy.utils;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.appledash.saneeconomy.SaneEconomy;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
@ -69,7 +70,7 @@ public class I18n {
|
||||
}
|
||||
|
||||
private String translate(String input) {
|
||||
return translations.containsKey(input) ? translations.get(input) : input;
|
||||
return translations.containsKey(input) ? ChatColor.translateAlternateColorCodes('&', translations.get(input)) : input;
|
||||
}
|
||||
|
||||
public static String _(String s) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Add a translation to the messages you wish to change, like this:
|
||||
# - message: That player is not online.
|
||||
# translation: Ce joueur n'est pas en ligne.
|
||||
# Colors can also be used, by means of prefixing color codes with an '&' symbol.
|
||||
messages:
|
||||
- message: You don't have permission to check the balance of %s.
|
||||
- message: That player is not online.
|
||||
|
Loading…
Reference in New Issue
Block a user