2011-03-19 22:39:51 +00:00
|
|
|
package com.earth2me.essentials.commands;
|
|
|
|
|
2011-11-21 01:55:26 +00:00
|
|
|
import static com.earth2me.essentials.I18n._;
|
2012-02-09 22:02:24 +00:00
|
|
|
import com.earth2me.essentials.Util;
|
2011-11-18 17:42:26 +00:00
|
|
|
import org.bukkit.Server;
|
2012-02-09 22:02:24 +00:00
|
|
|
import org.bukkit.command.CommandSender;
|
2011-03-19 22:39:51 +00:00
|
|
|
|
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
|
2011-03-19 22:39:51 +00:00
|
|
|
public class Commandping extends EssentialsCommand
|
|
|
|
{
|
|
|
|
public Commandping()
|
|
|
|
{
|
|
|
|
super("ping");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2012-02-09 22:02:24 +00:00
|
|
|
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
2011-03-19 22:39:51 +00:00
|
|
|
{
|
2012-02-09 22:02:24 +00:00
|
|
|
if (args.length < 1)
|
|
|
|
{
|
|
|
|
|
|
|
|
sender.sendMessage(_("pong"));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-03-22 22:07:13 +00:00
|
|
|
sender.sendMessage(Util.replaceFormat(getFinalArg(args, 0)));
|
2012-02-09 22:02:24 +00:00
|
|
|
}
|
2011-03-19 22:39:51 +00:00
|
|
|
}
|
|
|
|
}
|