auto restart system

master
Alex 2021-12-27 20:39:29 +01:00
parent a59d6ec83f
commit 1a39e6f0dc
1 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,9 @@ import earth.krakatao.KraSocketClientConfig;
import earth.krakatao.events.KraSocketClientEventInitiater;
import earth.krakatao.events.KraSocketClientEventInterface;
import earth.krakatao.protocol.KraSocketClientProtocol;
import earth.krakatao.protocol.KraSocketClientProtocolDest;
import earth.krakatao.protocol.KraSocketClientProtocolMessage;
import earth.krakatao.protocol.KraSocketClientProtocolStatus;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
@ -71,6 +74,15 @@ public class KrakatoaAPI extends JavaPlugin {
this.mongoManager.connect(this.configHandler.getMongodbDatabase());
loadListeners();
// call to proxy that the server is only for the auto restart system
KraSocketClientProtocolMessage kraSocketClientProtocolMessage = new KraSocketClientProtocolMessage(
KraSocketClientProtocolStatus.SEND.getStatus(), 0,
KraSocketClientProtocolDest.PROXY.getStatus(), "", (short) 59739,
CloudNetDriver.getInstance().getComponentName());
this.kraSocketClient.getSocketClient().SendMessage(kraSocketClientProtocolMessage);
}
@Override