New TL Key, allow formatting/colouring of help output.

This commit is contained in:
KHobbits 2012-03-12 15:21:37 +00:00
parent 2da802d4b7
commit c0490c0890
8 changed files with 12 additions and 5 deletions

View file

@ -50,7 +50,7 @@ public class HelpInput implements IText
final String node = "essentials." + k.getKey(); final String node = "essentials." + k.getKey();
if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node)) if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node))
{ {
lines.add("§c" + k.getKey() + "§7: " + k.getValue().get(DESCRIPTION)); lines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION)));
} }
} }
else else
@ -69,7 +69,7 @@ public class HelpInput implements IText
} }
if (user.isAuthorized("essentials.help." + pluginName)) if (user.isAuthorized("essentials.help." + pluginName))
{ {
lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION)));
} }
else if (permissions instanceof List && !((List<Object>)permissions).isEmpty()) else if (permissions instanceof List && !((List<Object>)permissions).isEmpty())
{ {
@ -84,21 +84,21 @@ public class HelpInput implements IText
} }
if (enabled) if (enabled)
{ {
lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION)));
} }
} }
else if (permissions instanceof String && !"".equals(permissions)) else if (permissions instanceof String && !"".equals(permissions))
{ {
if (user.isAuthorized(permissions.toString())) if (user.isAuthorized(permissions.toString()))
{ {
lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION)));
} }
} }
else else
{ {
if (!ess.getSettings().hidePermissionlessHelp()) if (!ess.getSettings().hidePermissionlessHelp())
{ {
lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION)));
} }
} }
} }

View file

@ -410,3 +410,4 @@ year=year
years=years years=years
youAreHealed=\u00a77You have been healed. youAreHealed=\u00a77You have been healed.
youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=\u00e5r
years=\u00e5r years=\u00e5r
youAreHealed=\u00a77Du er blevet healed. Halleluja! youAreHealed=\u00a77Du er blevet healed. Halleluja!
youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=Jahr
years=Jahre years=Jahre
youAreHealed=\u00a77Du wurdest geheilt. youAreHealed=\u00a77Du wurdest geheilt.
youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=year
years=years years=years
youAreHealed=\u00a77You have been healed. youAreHealed=\u00a77You have been healed.
youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=a&ntilde;o
years=a&ntilde;os years=a&ntilde;os
youAreHealed=\u00a77Has sido curado. youAreHealed=\u00a77Has sido curado.
youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=ann\u00e9e
years=ann\u00e9es years=ann\u00e9es
youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier. youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier.
helpLine=\u00a76/{0}\u00a7f: {1}

View file

@ -410,3 +410,4 @@ year=jaar
years=jaren years=jaren
youAreHealed=\u00a77Je bent genezen. youAreHealed=\u00a77Je bent genezen.
youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken.
helpLine=\u00a76/{0}\u00a7f: {1}