2011-03-19 22:39:51 +00:00
|
|
|
package com.earth2me.essentials.commands;
|
|
|
|
|
2013-10-16 19:59:39 +00:00
|
|
|
import com.earth2me.essentials.CommandSource;
|
2013-06-08 21:31:19 +00:00
|
|
|
import com.earth2me.essentials.utils.FormatUtil;
|
2011-11-18 17:42:26 +00:00
|
|
|
import org.bukkit.Server;
|
2011-03-19 22:39:51 +00:00
|
|
|
|
2015-04-15 04:06:16 +00:00
|
|
|
import static com.earth2me.essentials.I18n.tl;
|
|
|
|
|
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
|
2015-04-15 04:06:16 +00:00
|
|
|
public class Commandping extends EssentialsCommand {
|
|
|
|
public Commandping() {
|
|
|
|
super("ping");
|
|
|
|
}
|
2011-03-19 22:39:51 +00:00
|
|
|
|
2015-04-15 04:06:16 +00:00
|
|
|
@Override
|
|
|
|
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
2020-08-11 18:09:22 +00:00
|
|
|
if (args.length == 0) {
|
2015-04-15 04:06:16 +00:00
|
|
|
sender.sendMessage(tl("pong"));
|
|
|
|
} else {
|
|
|
|
sender.sendMessage(FormatUtil.replaceFormat(getFinalArg(args, 0)));
|
|
|
|
}
|
|
|
|
}
|
2011-03-19 22:39:51 +00:00
|
|
|
}
|