Rename scan servers to probe

This commit is contained in:
Myles 2016-10-02 19:45:55 +01:00
parent d0e7f05d50
commit 4b3f757881
2 changed files with 10 additions and 7 deletions

View File

@ -1,12 +1,12 @@
package us.myles.ViaVersion.bungee.commands;
import us.myles.ViaVersion.bungee.commands.subs.SearchServersSubCmd;
import us.myles.ViaVersion.bungee.commands.subs.ProbeSubCmd;
import us.myles.ViaVersion.commands.ViaCommandHandler;
public class BungeeCommandHandler extends ViaCommandHandler {
public BungeeCommandHandler() {
try {
registerSubCommand(new SearchServersSubCmd());
registerSubCommand(new ProbeSubCmd());
} catch (Exception e) {
System.out.println("Failed to register Bungee subcommands");
e.printStackTrace();

View File

@ -1,25 +1,28 @@
package us.myles.ViaVersion.bungee.commands.subs;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.command.ViaCommandSender;
import us.myles.ViaVersion.api.command.ViaSubCommand;
import us.myles.ViaVersion.bungee.platform.BungeeConfigAPI;
import us.myles.ViaVersion.bungee.service.ProtocolDetectorService;
// TODO better name
public class SearchServersSubCmd extends ViaSubCommand {
public class ProbeSubCmd extends ViaSubCommand {
@Override
public String name() {
return "searchservers";
return "probe";
}
@Override
public String description() {
return "Force ViaVersion to search for servers to update the version list (Also happens every minute)";
return "Forces ViaVersion to scan server protocol versions " +
(((BungeeConfigAPI) Via.getConfig()).getBungeePingInterval() == -1 ?
"" : "(Also happens at an interval)");
}
@Override
public boolean execute(ViaCommandSender sender, String[] args) {
ProtocolDetectorService.getInstance().run();
sendMessage(sender, "&6Started searching for subservers");
sendMessage(sender, "&6Started searching for protocol versions");
return true;
}
}