Socialspy for aliases of commands

Adding tell as alias of msg
This commit is contained in:
snowleo 2011-07-20 17:11:59 +02:00
parent cc29ebbbc9
commit 8828fb0868
2 changed files with 41 additions and 37 deletions

View file

@ -1,5 +1,8 @@
package com.earth2me.essentials;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
@ -453,7 +456,8 @@ public class EssentialsPlayerListener extends PlayerListener
}
final User user = ess.getUser(event.getPlayer());
final String cmd = event.getMessage().toLowerCase().split(" ")[0].replace("/", "").toLowerCase();
if (("msg".equals(cmd) || "r".equals(cmd) || "mail".equals(cmd)))
final List<String> commands = Arrays.asList("msg", "r", "mail", "m" , "t","emsg","tell","er","reply","ereply","email");
if (commands.contains(cmd))
{
for (Player player : ess.getServer().getOnlinePlayers())
{

View file

@ -179,7 +179,7 @@ commands:
msg:
description: Sends a private message to the specified player.
usage: /<command> <to> <message>
aliases: [m,t,emsg]
aliases: [m,t,emsg,tell]
mute:
description: Mutes or unmutes a player.
usage: /<command> [player] <datediff>