geforkt von Mirrors/Velocity
ProxyServer#getServerInfo -> ProxyServer#getServer
Dieser Commit ist enthalten in:
Ursprung
e1b2dc0d43
Commit
1f8152c3a5
@ -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.
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren