load web socket ack timeouts from config

master
Alex 2022-02-28 19:26:38 +01:00
parent 6ad8f734f6
commit f5774e5772
2 changed files with 5 additions and 2 deletions

View File

@ -62,12 +62,12 @@ public class KrakatoaAPI extends JavaPlugin {
try { try {
this.kraSocketClient = new KraSocketClient(kraSocketClientConfig, this.kraSocketClient = new KraSocketClient(kraSocketClientConfig,
this.kraSocketClientEventInterface, this.kraSocketClientProtocol); this.kraSocketClientEventInterface, this.kraSocketClientProtocol);
this.kraSocketClient.getSocketClient().connect();
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
e.printStackTrace(); e.printStackTrace();
} }
this.kraSocketClient.getSocketClient().connect();
this.mongoManager = new MongoManager(this.configHandler.getMongodbHost(), this.mongoManager = new MongoManager(this.configHandler.getMongodbHost(),
this.configHandler.getMongodbPort(), this.configHandler.getMongodbUsername(), this.configHandler.getMongodbPort(), this.configHandler.getMongodbUsername(),
this.configHandler.getMongodbPassword()); this.configHandler.getMongodbPassword());

View File

@ -2,6 +2,7 @@ package net.krakatoaapi.config;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.List;
import lombok.Getter; import lombok.Getter;
import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
@ -16,6 +17,7 @@ public class ConfigHandler {
private String webSocketProtocol; private String webSocketProtocol;
private String webSocketHost; private String webSocketHost;
private int webSocketPort; private int webSocketPort;
private List<Long> webSocketAckTimeouts;
private String webVoiceAddress; private String webVoiceAddress;
@ -36,6 +38,7 @@ public class ConfigHandler {
webSocketProtocol = fileConfiguration.getString("web_socket.protocol"); webSocketProtocol = fileConfiguration.getString("web_socket.protocol");
webSocketHost = fileConfiguration.getString("web_socket.host"); webSocketHost = fileConfiguration.getString("web_socket.host");
webSocketPort = fileConfiguration.getInt("web_socket.port"); webSocketPort = fileConfiguration.getInt("web_socket.port");
webSocketAckTimeouts = fileConfiguration.getLongList("web_socket.ack_timeouts");
webVoiceAddress = fileConfiguration.getString("web.voice_address"); webVoiceAddress = fileConfiguration.getString("web.voice_address");