Expose shutdownInProgress to the API. (#1485)
Co-authored-by: kyngs <kyngs@users.noreply.github.com>
This commit is contained in:
@@ -41,6 +41,13 @@ public interface ProxyServer extends Audience {
|
||||
*/
|
||||
void shutdown();
|
||||
|
||||
/**
|
||||
* Returns whether the proxy is currently shutting down.
|
||||
*
|
||||
* @return {@code true} if the proxy is shutting down, {@code false} otherwise
|
||||
*/
|
||||
boolean isShuttingDown();
|
||||
|
||||
/**
|
||||
* Closes all listening endpoints for this server.
|
||||
* This includes the main minecraft listener and query channel.
|
||||
|
@@ -803,6 +803,11 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
|
||||
public VelocityChannelRegistrar getChannelRegistrar() {
|
||||
return channelRegistrar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShuttingDown() {
|
||||
return shutdownInProgress.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetSocketAddress getBoundAddress() {
|
||||
|
Reference in New Issue
Block a user