Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Initial implementation of raw registered server creation.
Dieser Commit ist enthalten in:
Ursprung
aab8f86aa8
Commit
d74afb013f
@ -107,6 +107,14 @@ public interface ProxyServer extends Audience {
|
|||||||
*/
|
*/
|
||||||
Collection<RegisteredServer> matchServer(String partialName);
|
Collection<RegisteredServer> matchServer(String partialName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a raw {@link RegisteredServer} without tying it into the internal server map.
|
||||||
|
*
|
||||||
|
* @param server the server to register
|
||||||
|
* @return the {@link RegisteredServer} implementation created by the provided {@link ServerInfo}.
|
||||||
|
*/
|
||||||
|
RegisteredServer createRawRegisteredServer(ServerInfo server);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a server with this proxy. A server with this name should not already exist.
|
* Registers a server with this proxy. A server with this name should not already exist.
|
||||||
*
|
*
|
||||||
|
@ -673,6 +673,11 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
|
|||||||
return servers.getAllServers();
|
return servers.getAllServers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegisteredServer createRawRegisteredServer(ServerInfo server) {
|
||||||
|
return servers.createRawRegisteredServer(server);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RegisteredServer registerServer(ServerInfo server) {
|
public RegisteredServer registerServer(ServerInfo server) {
|
||||||
return servers.register(server);
|
return servers.register(server);
|
||||||
|
@ -53,6 +53,17 @@ public class ServerMap {
|
|||||||
return ImmutableList.copyOf(servers.values());
|
return ImmutableList.copyOf(servers.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a raw implementation of a {@link RegisteredServer} without
|
||||||
|
* tying it to the internal server map.
|
||||||
|
*
|
||||||
|
* @param serverInfo the server to create a registered server with
|
||||||
|
* @return the {@link RegisteredServer} built from the {@link ServerInfo}
|
||||||
|
*/
|
||||||
|
public RegisteredServer createRawRegisteredServer(ServerInfo serverInfo) {
|
||||||
|
return new VelocityRegisteredServer(server, serverInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a server with the proxy.
|
* Registers a server with the proxy.
|
||||||
*
|
*
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren