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

24 lines
768 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
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;
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");
}
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 {
if (args.length == 0) {
2015-04-15 04:06:16 +00:00
sender.sendMessage(tl("pong"));
} else {
sender.sendMessage(FormatUtil.replaceFormat(getFinalArg(args, 0)));
}
}
}