13
0
geforkt von Mirrors/Velocity

ProxyServer#getServerInfo -> ProxyServer#getServer

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-16 13:16:16 -04:00
Ursprung e1b2dc0d43
Commit 1f8152c3a5
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -50,7 +50,7 @@ public interface ProxyServer {
* @param name the name of the server * @param name the name of the server
* @return the registered server, which may be empty * @return the registered server, which may be empty
*/ */
Optional<RegisteredServer> getServerInfo(String name); Optional<RegisteredServer> getServer(String name);
/** /**
* Retrieves all {@link RegisteredServer}s registered with this proxy. * Retrieves all {@link RegisteredServer}s registered with this proxy.

Datei anzeigen

@ -264,7 +264,7 @@ public class VelocityServer implements ProxyServer {
} }
@Override @Override
public Optional<RegisteredServer> getServerInfo(String name) { public Optional<RegisteredServer> getServer(String name) {
Preconditions.checkNotNull(name, "name"); Preconditions.checkNotNull(name, "name");
return servers.getServer(name); return servers.getServer(name);
} }

Datei anzeigen

@ -35,7 +35,7 @@ public class ServerCommand implements Command {
if (args.length == 1) { if (args.length == 1) {
// Trying to connect to a server. // Trying to connect to a server.
String serverName = args[0]; String serverName = args[0];
Optional<RegisteredServer> toConnect = server.getServerInfo(serverName); Optional<RegisteredServer> toConnect = server.getServer(serverName);
if (!toConnect.isPresent()) { if (!toConnect.isPresent()) {
player.sendMessage(TextComponent.of("Server " + serverName + " doesn't exist.", TextColor.RED)); player.sendMessage(TextComponent.of("Server " + serverName + " doesn't exist.", TextColor.RED));
return; return;