Updating actions to allow translations, and colour.

This commit is contained in:
KHobbits 2011-10-29 09:38:32 +01:00
parent c2c889cab9
commit 284f48f631
7 changed files with 12 additions and 8 deletions

View File

@ -24,15 +24,13 @@ public class Commandme extends EssentialsCommand
{ {
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();
} }
final StringBuilder message = new StringBuilder();
message.append("* "); String message = getFinalArg(args, 1);
message.append(user.getDisplayName()); if (user.isAuthorized("essentials.chat.color"))
message.append(' ');
for (int i = 0; i < args.length; i++)
{ {
message.append(args[i]); message = message.replaceAll("&([0-9a-f])", "§$1");
message.append(' ');
} }
ess.broadcastMessage(user, message.toString());
ess.broadcastMessage(user, Util.format("action", user.getDisplayName(), message));
} }
} }

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: # by:
action = * {0} {1}
addedToAccount = \u00a7a{0} has been added to your account. addedToAccount = \u00a7a{0} has been added to your account.
addedToOthersAccount = \u00a7a{0} has been added to {1} account. addedToOthersAccount = \u00a7a{0} has been added to {1} account.
alertBroke = broke: alertBroke = broke:

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: papand13, papand13@gmail.com # by: papand13, papand13@gmail.com
action = * {0} {1}
addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto. addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto.
addedToOthersAccount = \u00a7a{0} er blevet tilf\u00f8jet til {1} konto. addedToOthersAccount = \u00a7a{0} er blevet tilf\u00f8jet til {1} konto.
alertBroke = \u00f8delagde: alertBroke = \u00f8delagde:

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: # by:
action = * {0} {1}
addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt. addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
addedToOthersAccount = \u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt. addedToOthersAccount = \u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt.
alertBroke = zerst\u00f6rt: alertBroke = zerst\u00f6rt:

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: # by:
action = * {0} {1}
addedToAccount = \u00a7a{0} has been added to your account. addedToAccount = \u00a7a{0} has been added to your account.
addedToOthersAccount = \u00a7a{0} has been added to {1} account. addedToOthersAccount = \u00a7a{0} has been added to {1} account.
alertBroke = broke: alertBroke = broke:

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: # by:
action = * {0} {1}
addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte. addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
addedToOthersAccount = \u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte. addedToOthersAccount = \u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte.
alertBroke = a cass\u00e9: alertBroke = a cass\u00e9:

View File

@ -2,6 +2,7 @@
# Single quotes have to be doubled: '' # Single quotes have to be doubled: ''
# Translations start here # Translations start here
# by: Geertje123 # by: Geertje123
action = * {0} {1}
addedToAccount = \u00a7a{0} is gestort op je account. addedToAccount = \u00a7a{0} is gestort op je account.
addedToOthersAccount = \u00a7a{0} is overgemaakt naar {1}''s rekening addedToOthersAccount = \u00a7a{0} is overgemaakt naar {1}''s rekening
alertBroke = gebroken: alertBroke = gebroken: