3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-24 23:30:15 +01:00

Rename scan servers to probe

Dieser Commit ist enthalten in:
Myles 2016-10-02 19:45:55 +01:00
Ursprung d0e7f05d50
Commit 4b3f757881
2 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -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();

Datei anzeigen

@ -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;
}
}