TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commandme.java
KHobbits d20519ef8b New Permission: essentials.chat.url
Without this perm, URLs will be modified not to be links.
2012-03-22 22:19:58 +00:00

35 lines
759 B
Java

package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
public class Commandme extends EssentialsCommand
{
public Commandme()
{
super("me");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (user.isMuted())
{
throw new Exception(_("voiceSilenced"));
}
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
String message = getFinalArg(args, 0);
message = Util.formatMessage(user, "essentials.chat", message);
user.setDisplayNick();
ess.broadcastMessage(user, _("action", user.getDisplayName(), message));
}
}