TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commandping.java

30 lines
693 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
2011-11-18 17:42:26 +00:00
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
2012-10-06 02:31:34 +00:00
// This command can be used to echo messages to the users screen, mostly useless but also an #EasterEgg
public class Commandping extends EssentialsCommand
{
public Commandping()
{
super("ping");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
sender.sendMessage(_("pong"));
}
else
{
sender.sendMessage(Util.replaceFormat(getFinalArg(args, 0)));
}
}
}