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:
Ursprung
d0e7f05d50
Commit
4b3f757881
@ -1,12 +1,12 @@
|
|||||||
package us.myles.ViaVersion.bungee.commands;
|
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;
|
import us.myles.ViaVersion.commands.ViaCommandHandler;
|
||||||
|
|
||||||
public class BungeeCommandHandler extends ViaCommandHandler {
|
public class BungeeCommandHandler extends ViaCommandHandler {
|
||||||
public BungeeCommandHandler() {
|
public BungeeCommandHandler() {
|
||||||
try {
|
try {
|
||||||
registerSubCommand(new SearchServersSubCmd());
|
registerSubCommand(new ProbeSubCmd());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Failed to register Bungee subcommands");
|
System.out.println("Failed to register Bungee subcommands");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
package us.myles.ViaVersion.bungee.commands.subs;
|
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.ViaCommandSender;
|
||||||
import us.myles.ViaVersion.api.command.ViaSubCommand;
|
import us.myles.ViaVersion.api.command.ViaSubCommand;
|
||||||
|
import us.myles.ViaVersion.bungee.platform.BungeeConfigAPI;
|
||||||
import us.myles.ViaVersion.bungee.service.ProtocolDetectorService;
|
import us.myles.ViaVersion.bungee.service.ProtocolDetectorService;
|
||||||
|
|
||||||
// TODO better name
|
public class ProbeSubCmd extends ViaSubCommand {
|
||||||
public class SearchServersSubCmd extends ViaSubCommand {
|
|
||||||
@Override
|
@Override
|
||||||
public String name() {
|
public String name() {
|
||||||
return "searchservers";
|
return "probe";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description() {
|
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
|
@Override
|
||||||
public boolean execute(ViaCommandSender sender, String[] args) {
|
public boolean execute(ViaCommandSender sender, String[] args) {
|
||||||
ProtocolDetectorService.getInstance().run();
|
ProtocolDetectorService.getInstance().run();
|
||||||
sendMessage(sender, "&6Started searching for subservers");
|
sendMessage(sender, "&6Started searching for protocol versions");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren