    001    package net.minecraft.src;
    002
    003    import java.util.List;
    004    import net.minecraft.server.MinecraftServer;
    005
    006    public class CommandServerEmote extends CommandBase
    007    {
    008        public String getCommandName()
    009        {
    010            return "me";
    011        }
    012
    013        public String getCommandUsage(ICommandSender par1ICommandSender)
    014        {
    015            return par1ICommandSender.translateString("commands.me.usage", new Object[0]);
    016        }
    017
    018        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    019        {
    020            if (par2ArrayOfStr.length > 0)
    021            {
    022                String var3 = joinString(par2ArrayOfStr, 0);
    023                MinecraftServer.getServer().getConfigurationManager().sendPacketToAllPlayers(new Packet3Chat("* " + par1ICommandSender.getCommandSenderName() + " " + var3));
    024            }
    025            else
    026            {
    027                throw new WrongUsageException("commands.me.usage", new Object[0]);
    028            }
    029        }
    030
    031        /**
    032         * Adds the strings available in this command to the given list of tab completion options.
    033         */
    034        public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    035        {
    036            return getListOfStringsMatchingLastWord(par2ArrayOfStr, MinecraftServer.getServer().getAllUsernames());
    037        }
    038    }