@@ -59,7 +59,7 @@ public void run(final Server server, final User user, final String commandLabel,
5959 throw new Exception (tl ("playerNeverOnServer" , args [1 ]));
6060 }
6161
62- final String mail = user .getName () + ": " + StringUtil .sanitizeString (FormatUtil .stripFormat (getFinalArg (args , 2 )));
62+ final String mail = tl ( "mailFormat" , user .getName (), StringUtil .sanitizeString (FormatUtil .stripFormat (getFinalArg (args , 2 ) )));
6363 if (mail .length () > 1000 )
6464 {
6565 throw new Exception (tl ("mailTooLong" ));
@@ -90,7 +90,7 @@ public void run(final Server server, final User user, final String commandLabel,
9090 {
9191 throw new Exception (tl ("noPerm" , "essentials.mail.sendall" ));
9292 }
93- ess .runTaskAsynchronously (new SendAll (user .getName () + ": " + FormatUtil .stripFormat (getFinalArg (args , 1 ))));
93+ ess .runTaskAsynchronously (new SendAll (tl ( "mailFormat" , user .getName (), FormatUtil .stripFormat (getFinalArg (args , 1 ) ))));
9494 user .sendMessage (tl ("mailSent" ));
9595 return ;
9696 }
@@ -121,13 +121,13 @@ else if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
121121 {
122122 throw new Exception (tl ("playerNeverOnServer" , args [1 ]));
123123 }
124- u .addMail ("Server: " + getFinalArg (args , 2 ));
124+ u .addMail (tl ( "mailFormat" , "Server" , getFinalArg (args , 2 ) ));
125125 sender .sendMessage (tl ("mailSent" ));
126126 return ;
127127 }
128128 else if (args .length >= 2 && "sendall" .equalsIgnoreCase (args [0 ]))
129129 {
130- ess .runTaskAsynchronously (new SendAll ("Server: " + getFinalArg (args , 1 )));
130+ ess .runTaskAsynchronously (new SendAll (tl ( "mailFormat" , "Server" , getFinalArg (args , 1 ) )));
131131 sender .sendMessage (tl ("mailSent" ));
132132 return ;
133133 }
@@ -139,7 +139,7 @@ else if (args.length >= 2)
139139 {
140140 throw new Exception (tl ("playerNeverOnServer" , args [0 ]));
141141 }
142- u .addMail ("Server: " + getFinalArg (args , 1 ));
142+ u .addMail (tl ( "mailFormat" , "Server" , getFinalArg (args , 1 ) ));
143143 sender .sendMessage (tl ("mailSent" ));
144144 return ;
145145 }
0 commit comments