Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
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
|
||||
* @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.
|
||||
|
@ -264,7 +264,7 @@ public class VelocityServer implements ProxyServer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<RegisteredServer> getServerInfo(String name) {
|
||||
public Optional<RegisteredServer> getServer(String name) {
|
||||
Preconditions.checkNotNull(name, "name");
|
||||
return servers.getServer(name);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class ServerCommand implements Command {
|
||||
if (args.length == 1) {
|
||||
// Trying to connect to a server.
|
||||
String serverName = args[0];
|
||||
Optional<RegisteredServer> toConnect = server.getServerInfo(serverName);
|
||||
Optional<RegisteredServer> toConnect = server.getServer(serverName);
|
||||
if (!toConnect.isPresent()) {
|
||||
player.sendMessage(TextComponent.of("Server " + serverName + " doesn't exist.", TextColor.RED));
|
||||
return;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren